LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ScopeGuardList Class Referencefinal

Keeps a list of functions to call. More...

#include <scopeguardlist.h>

+ Inheritance diagram for ScopeGuardList:
+ Collaboration diagram for ScopeGuardList:

Public Member Functions

 ScopeGuardList ()=default
 
 ScopeGuardList (size_t size) noexcept
 
 ScopeGuardList (ScopeGuardList &&rhs) noexcept
 
 ScopeGuardList (const ScopeGuardList &)=delete
 
ScopeGuardListoperator= (const ScopeGuardList &)=delete
 
 ~ScopeGuardList () noexcept
 
template<class Fun >
void add (Fun f)
 
- Public Member Functions inherited from ScopeGuardBase
 ScopeGuardBase () noexcept
 
 ScopeGuardBase (ScopeGuardBase &&rhs) noexcept
 
void dismiss () noexcept
 

Private Attributes

std::vector< std::function
< void()> > 
mScopeGuards
 

Additional Inherited Members

- Protected Member Functions inherited from ScopeGuardBase
 ~ScopeGuardBase ()=default
 
- Protected Attributes inherited from ScopeGuardBase
bool mActive
 

Detailed Description

Keeps a list of functions to call.

See Also
ScopeGuard

Constructor & Destructor Documentation

ScopeGuardList ( )
default
ScopeGuardList ( size_t  size)
inlinenoexcept
ScopeGuardList ( ScopeGuardList &&  rhs)
inlinenoexcept
ScopeGuardList ( const ScopeGuardList )
delete
~ScopeGuardList ( )
inlinenoexcept

Calls the added functions in reverse order

+ Here is the call graph for this function:

Member Function Documentation

ScopeGuardList& operator= ( const ScopeGuardList )
delete
void add ( Fun  f)
inline

Add a function

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<std::function<void()> > mScopeGuards
private

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