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
Collaboration diagram for Code Structuring Tools:

Classes

class  JKQTPFinalAct< F >
 C++11 finally construct (executes a callable-object when the edestructor is executed) More...
 

Functions

template<class F >
JKQTPFinalAct< F > JKQTPFinally (const F &f) noexcept
 C++11 finally construct (executes a callable-object at the end of a scope)
 
template<class F >
JKQTPFinalAct< F > JKQTPFinally (F &&f) noexcept
 C++11 finally construct (executes a callable-object at the end of a scope)
 

Detailed Description

Classes and functions that help to structure the code (e.g. RAII constructs)

Function Documentation

◆ JKQTPFinally() [1/2]

template<class F >
JKQTPFinalAct< F > JKQTPFinally ( const F &  f)
inlinenoexcept

C++11 finally construct (executes a callable-object at the end of a scope)

Typical usage:

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

◆ JKQTPFinally() [2/2]

template<class F >
JKQTPFinalAct< F > JKQTPFinally ( F &&  f)
inlinenoexcept

C++11 finally construct (executes a callable-object at the end of a scope)

Typical usage:

{
// the instruction 'painter.restore()' will be executed at the end
// of the block, when __finalpaint is destroyed (see (*) below)
auto __finalpaint=JKQTPFinally([&painter]() { painter.restore(); });
// ...
// do something ...
// ...
} // (*) 'painter.restore()' is executed before the end of this block!
See also
JKQTPFinalAct