Documentation for Error

Former-commit-id: 9158cb014b813739b09b0bea7c375dc549815aef
This commit is contained in:
Gawaboumga
2016-02-21 14:39:05 +01:00
parent 99370683b3
commit ff51b90748
2 changed files with 89 additions and 1 deletions

View File

@@ -8,22 +8,50 @@
namespace Nz
{
/*!
* \class Nz::ErrorFlags
* \brief Core class that represents flags for error
*/
/*!
* \brief Constructs a ErrorFlags object with flags
*
* \param flags Flags for the error
* \param replace Replace the entirely the old flag if true, else do a "OR"
*/
ErrorFlags::ErrorFlags(UInt32 flags, bool replace) :
m_previousFlags(Error::GetFlags())
{
SetFlags(flags, replace);
}
/*!
* \brief Destructs the object and sets the old flag
*/
ErrorFlags::~ErrorFlags()
{
Error::SetFlags(m_previousFlags);
}
/*!
* \brief Gets the previous flag
* \return Previous flag
*/
UInt32 ErrorFlags::GetPreviousFlags() const
{
return m_previousFlags;
}
/*!
* \brief Sets the flags
*
* \param flags Flags for the error
* \param replace Replace the entirely the old flag if true, else do a "OR"
*/
void ErrorFlags::SetFlags(UInt32 flags, bool replace)
{
if (!replace)