Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor::ScopeGuard< ScopeExitFuncType > Class Template Reference

Class used to execute code at scope exit. More...

#include <ScopeGuard.hpp>

Public Member Functions

 ScopeGuard (ScopeExitFuncType const &function)
 Constructor.
 
 ScopeGuard (ScopeGuard const &rhs)=delete
 Copy Constructor.
 
 ScopeGuard (ScopeGuard &&rhs) noexcept=default
 Move Constructor.
 
 ~ScopeGuard () noexcept
 Destructor.
 
ScopeGuardoperator= (ScopeGuard const &rhs)=delete
 Copy Constructor.
 
ScopeGuardoperator= (ScopeGuard &&rhs) noexcept=default
 Move Constructor.
 

Detailed Description

template<typename ScopeExitFuncType>
class castor::ScopeGuard< ScopeExitFuncType >

Class used to execute code at scope exit.

Constructor & Destructor Documentation

◆ ScopeGuard() [1/3]

template<typename ScopeExitFuncType >
castor::ScopeGuard< ScopeExitFuncType >::ScopeGuard ( ScopeExitFuncType const & function)
inlineexplicit

Constructor.

Parameters
[in]functionThe function.

◆ ScopeGuard() [2/3]

template<typename ScopeExitFuncType >
castor::ScopeGuard< ScopeExitFuncType >::ScopeGuard ( ScopeGuard< ScopeExitFuncType > const & rhs)
delete

Copy Constructor.

Parameters
[in]rhsThe object to copy.

◆ ScopeGuard() [3/3]

template<typename ScopeExitFuncType >
castor::ScopeGuard< ScopeExitFuncType >::ScopeGuard ( ScopeGuard< ScopeExitFuncType > && rhs)
defaultnoexcept

Move Constructor.

Parameters
[in]rhsThe object to move.

◆ ~ScopeGuard()

template<typename ScopeExitFuncType >
castor::ScopeGuard< ScopeExitFuncType >::~ScopeGuard ( )
inlinenoexcept

Destructor.

Member Function Documentation

◆ operator=() [1/2]

template<typename ScopeExitFuncType >
ScopeGuard & castor::ScopeGuard< ScopeExitFuncType >::operator= ( ScopeGuard< ScopeExitFuncType > && rhs)
defaultnoexcept

Move Constructor.

Parameters
[in]rhsThe object to move.

◆ operator=() [2/2]

template<typename ScopeExitFuncType >
ScopeGuard & castor::ScopeGuard< ScopeExitFuncType >::operator= ( ScopeGuard< ScopeExitFuncType > const & rhs)
delete

Copy Constructor.

Parameters
[in]rhsThe object to copy.

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