7 #ifndef NAZARA_CALLONEXIT_HPP 8 #define NAZARA_CALLONEXIT_HPP 10 #include <Nazara/Prerequesites.hpp> 17 using Func = std::function<void()>;
26 void Reset(Func func =
nullptr);
36 #include <Nazara/Core/CallOnExit.inl> 38 #endif // NAZARA_CALLONEXIT_HPP TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
CallOnExit(Func func=nullptr)
Constructs a CallOnExit object with a function.
Definition: CallOnExit.inl:22
~CallOnExit()
Destructs the object and calls the function.
Definition: CallOnExit.inl:31
Core class that represents a function to call at the end of the scope.
Definition: CallOnExit.hpp:15
void CallAndReset(Func func=nullptr)
Calls the function and sets the new callback.
Definition: CallOnExit.inl:43
void Reset(Func func=nullptr)
Resets the function.
Definition: CallOnExit.inl:57