Plasma Engine  2.0
Loading...
Searching...
No Matches
plResult Struct Reference

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

#include <Types.h>

Public Member Functions

 plResult (plResultEnum res)
 
void operator= (plResultEnum rhs)
 
bool operator== (plResultEnum cmp) const
 
bool operator!= (plResultEnum cmp) const
 
PL_ALWAYS_INLINE bool Succeeded () const
 
PL_ALWAYS_INLINE bool Failed () const
 
PL_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 plResult::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: