Sleeping Wombat Common Library
0.50.0
swCommonLibrary
|
Alexandrescu Expected type for error handling. More...
#include <Nullable.h>
Public Types | |
typedef ExceptionPtr | ErrorType |
Public Member Functions | |
Nullable (ContentType &&content) | |
Nullable (const ContentType &content) | |
Nullable (const ErrorType &error) | |
Nullable (const std::string &error) | |
Nullable (const Nullable< ContentType > &that) | |
template<typename ExceptionType > | |
Nullable (std::shared_ptr< ExceptionType > error) | |
bool | IsValid () |
std::string | GetErrorReason () |
ErrorType | GetError () |
bool | operator== (const ContentType &that) |
bool | operator!= (const ContentType &that) |
Nullable< ContentType > & | operator= (const Nullable< ContentType > &that) |
const ContentType & | Get () const |
operator const ContentType & () const | |
ContentType & | Get () |
operator ContentType & () | |
Static Public Member Functions | |
static Nullable | FromError (const ErrorType &error) |
static Nullable | FromError (const std::string &reason) |
static Nullable | FromError () |
Protected Attributes | |
union { | |
ContentType Content | |
ErrorType Error | |
}; | |
bool | m_isValid |
Alexandrescu Expected type for error handling.