Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::CallOnExit Class Reference

Core class that represents a function to call at the end of the scope. More...

Public Member Functions

 CallOnExit (Func func=nullptr)
 Constructs a CallOnExit object with a function. More...
 
 CallOnExit (const CallOnExit &)=delete
 
 CallOnExit (CallOnExit &&)=delete
 
 ~CallOnExit ()
 Destructs the object and calls the function.
 
void CallAndReset (Func func=nullptr)
 Calls the function and sets the new callback. More...
 
void Reset (Func func=nullptr)
 Resets the function. More...
 
CallOnExitoperator= (const CallOnExit &)=delete
 
CallOnExitoperator= (CallOnExit &&)=default
 

Detailed Description

Core class that represents a function to call at the end of the scope.

Constructor & Destructor Documentation

◆ CallOnExit()

Nz::CallOnExit::CallOnExit ( Func  func = nullptr)
inline

Constructs a CallOnExit object with a function.

Parameters
funcFunction to call on exit

Member Function Documentation

◆ CallAndReset()

void Nz::CallOnExit::CallAndReset ( Func  func = nullptr)
inline

Calls the function and sets the new callback.

Parameters
funcFunction to call on exit

◆ Reset()

void Nz::CallOnExit::Reset ( Func  func = nullptr)
inline

Resets the function.

Parameters
funcFunction to call on exit

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