Sleeping Wombat Common Library  0.50.0
swCommonLibrary
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
sw::Nullable< ContentType > Class Template Reference

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
 

Detailed Description

template<typename ContentType>
class sw::Nullable< ContentType >

Alexandrescu Expected type for error handling.


The documentation for this class was generated from the following file: