LibrePCB Developers Documentation
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() [1/4]

ScopeGuardList ( )
default

◆ ScopeGuardList() [2/4]

ScopeGuardList ( size_t  size)
inlinenoexcept

◆ ScopeGuardList() [3/4]

ScopeGuardList ( ScopeGuardList &&  rhs)
inlinenoexcept

◆ ScopeGuardList() [4/4]

ScopeGuardList ( const ScopeGuardList )
delete

◆ ~ScopeGuardList()

~ScopeGuardList ( )
inlinenoexcept

Calls the added functions in reverse order

+ Here is the call graph for this function:

Member Function Documentation

◆ operator=()

ScopeGuardList & operator= ( const ScopeGuardList )
delete

◆ add()

void add ( Fun  f)
inline

Add a function

+ Here is the caller graph for this function:

Member Data Documentation

◆ mScopeGuards

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

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