JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches
JKQTPFinalAct< F > Class Template Reference

C++11 finally construct (executes a callable-object when the edestructor is executed) More...

#include <jkqtpcodestructuring.h>

Public Member Functions

 JKQTPFinalAct (const JKQTPFinalAct &)=delete
 
 JKQTPFinalAct (F f) noexcept
 
 JKQTPFinalAct (JKQTPFinalAct &&other) noexcept
 
 ~JKQTPFinalAct () noexcept
 
JKQTPFinalActoperator= (const JKQTPFinalAct &)=delete
 

Private Attributes

f_
 
bool invoke_
 

Detailed Description

template<class F>
class JKQTPFinalAct< F >

C++11 finally construct (executes a callable-object when the edestructor is executed)

Typical usage:

{
// the instruction 'painter.restore()' will be executed at the end
// of the block, when __finalpaint is destroyed (see (*) below)
JKQTPFinalAct __finalpaint([&painter]() { painter.restore(); });
// ...
// do something ...
// ...
} // (*) 'painter.restore()' is executed before the end of this block!
C++11 finally construct (executes a callable-object when the edestructor is executed)
Definition jkqtpcodestructuring.h:48
See also
JKQTPFinally()

Constructor & Destructor Documentation

◆ JKQTPFinalAct() [1/3]

template<class F >
JKQTPFinalAct< F >::JKQTPFinalAct ( f)
inlineexplicitnoexcept

◆ JKQTPFinalAct() [2/3]

template<class F >
JKQTPFinalAct< F >::JKQTPFinalAct ( JKQTPFinalAct< F > &&  other)
inlinenoexcept

◆ JKQTPFinalAct() [3/3]

template<class F >
JKQTPFinalAct< F >::JKQTPFinalAct ( const JKQTPFinalAct< F > &  )
delete

◆ ~JKQTPFinalAct()

template<class F >
JKQTPFinalAct< F >::~JKQTPFinalAct ( )
inlinenoexcept

Member Function Documentation

◆ operator=()

template<class F >
JKQTPFinalAct & JKQTPFinalAct< F >::operator= ( const JKQTPFinalAct< F > &  )
delete

Member Data Documentation

◆ f_

template<class F >
F JKQTPFinalAct< F >::f_
private

◆ invoke_

template<class F >
bool JKQTPFinalAct< F >::invoke_
private

The documentation for this class was generated from the following file: