XII Release 0.1.0
Loading...
Searching...
No Matches
xiiResult Struct Reference

Default enum for returning failure or success, instead of using a bool. More...

#include <Types.h>

Public Member Functions

 xiiResult (xiiResultEnum res)
 
void operator= (xiiResultEnum rhs)
 
bool operator== (xiiResultEnum cmp) const
 
XII_ALWAYS_INLINE bool Succeeded () const
 
XII_ALWAYS_INLINE bool Failed () const
 
XII_ALWAYS_INLINE void IgnoreResult ()
 Used to silence compiler warnings, when success or failure doesn't matter.
 
void AssertSuccess (const char *szMsg=nullptr, const char *szDetails=nullptr) const
 Asserts that the function succeeded. In case of failure, the program will terminate.
 

Detailed Description

Default enum for returning failure or success, instead of using a bool.

Member Function Documentation

◆ AssertSuccess()

void xiiResult::AssertSuccess ( const char * szMsg = nullptr,
const char * szDetails = nullptr ) const

Asserts that the function succeeded. In case of failure, the program will terminate.

If msg is given, this will be the assert message. If details is provided, msg should contain a formatting element ({}), e.g. "Error: {}".


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