Documentation for the rest

Former-commit-id: b6f401370127679db397da0039cb5e98477e90db
This commit is contained in:
Gawaboumga
2016-02-21 14:42:38 +01:00
parent b62b694af8
commit 2a28d8863c
7 changed files with 851 additions and 43 deletions

View File

@@ -7,17 +7,38 @@
namespace Nz
{
/*!
* \class Nz::CallOnExit
* \brief Core class that represents a function to call at the end of the scope
*/
/*!
* \brief Constructs a CallOnExit object with a function
*
* \param func Function to call on exit
*/
inline CallOnExit::CallOnExit(Func func) :
m_func(func)
{
}
/*!
* \brief Destructs the object and calls the function
*/
inline CallOnExit::~CallOnExit()
{
if (m_func)
m_func();
}
/*!
* \brief Calls the function and sets the new callback
*
* \param func Function to call on exit
*/
inline void CallOnExit::CallAndReset(Func func)
{
if (m_func)
@@ -26,6 +47,12 @@ namespace Nz
Reset(func);
}
/*!
* \brief Resets the function
*
* \param func Function to call on exit
*/
inline void CallOnExit::Reset(Func func)
{
m_func = func;