omw  0.2.1-beta
Public Member Functions | Friends | List of all members
omw::windows::ErrorCode Class Reference

Public Member Functions

 ErrorCode ()
 Default ctor. More...
 
 ErrorCode (int code, const std::string &message="")
 Ctor to initialize the attributes. More...
 
virtual int code () const
 Getter for the error code. More...
 
virtual const std::stringmsg () const
 Getter for the message. More...
 
virtual bool good () const
 
std::string toString () const
 

Friends

std::ostream & operator<< (std::ostream &os, const ErrorCode &ec)
 

Constructor & Destructor Documentation

◆ ErrorCode() [1/2]

omw::windows::ErrorCode::ErrorCode ( )

Default ctor.

Initializes the code with 0 and the message string with OK.

◆ ErrorCode() [2/2]

omw::windows::ErrorCode::ErrorCode ( int  code,
const std::string message = "" 
)

Ctor to initialize the attributes.

Parameters
codeThe actual error code
messageThe codes message string

Member Function Documentation

◆ code()

int omw::windows::ErrorCode::code ( ) const
virtual

Getter for the error code.

Returns
The error code

◆ good()

bool omw::windows::ErrorCode::good ( ) const
virtual
Returns
true if code() == omw::windows::EC_OK

◆ msg()

const std::string & omw::windows::ErrorCode::msg ( ) const
virtual

Getter for the message.

Returns
Message string

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