asio::error_code Class Reference

Class to represent an error code value. More...

#include <error_code.hpp>

List of all members.

Public Types

typedef int value_type
 The underlying representation of an error code.
typedef unspecified_bool_type_tunspecified_bool_type

Public Member Functions

 error_code ()
 Default constructor.
 error_code (value_type v, error_category c)
 Construct with specific error code and category.
value_type value () const
 Get the error value.
error_category category () const
 Get the error category.
std::string message () const
 Get the message associated with the error.
 operator unspecified_bool_type () const
 Operator returns non-null if there is a non-success error code.
bool operator! () const
 Operator to test if the error represents success.

Private Attributes

value_type value_
error_category category_

Friends

bool operator== (const error_code &e1, const error_code &e2)
 Equality operator to compare two error objects.
bool operator!= (const error_code &e1, const error_code &e2)
 Inequality operator to compare two error objects.

Classes

struct  unspecified_bool_type_t


Detailed Description

Class to represent an error code value.

Definition at line 55 of file error_code.hpp.


Member Typedef Documentation

The underlying representation of an error code.

Definition at line 59 of file error_code.hpp.

Definition at line 94 of file error_code.hpp.


Constructor & Destructor Documentation

asio::error_code::error_code (  )  [inline]

Default constructor.

Definition at line 62 of file error_code.hpp.

asio::error_code::error_code ( value_type  v,
error_category  c 
) [inline]

Construct with specific error code and category.

Definition at line 69 of file error_code.hpp.


Member Function Documentation

value_type asio::error_code::value (  )  const [inline]

error_category asio::error_code::category (  )  const [inline]

Get the error category.

Definition at line 82 of file error_code.hpp.

References category_.

std::string asio::error_code::message (  )  const [inline]

asio::error_code::operator unspecified_bool_type (  )  const [inline]

Operator returns non-null if there is a non-success error code.

Definition at line 97 of file error_code.hpp.

References value_.

bool asio::error_code::operator! (  )  const [inline]

Operator to test if the error represents success.

Definition at line 106 of file error_code.hpp.

References value_.


Friends And Related Function Documentation

bool operator== ( const error_code e1,
const error_code e2 
) [friend]

Equality operator to compare two error objects.

Definition at line 112 of file error_code.hpp.

bool operator!= ( const error_code e1,
const error_code e2 
) [friend]

Inequality operator to compare two error objects.

Definition at line 118 of file error_code.hpp.


Member Data Documentation

Definition at line 125 of file error_code.hpp.

Referenced by message(), operator unspecified_bool_type(), operator!(), and value().

Definition at line 128 of file error_code.hpp.

Referenced by category(), and message().


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

Generated on Sun May 25 00:21:29 2008 by  doxygen 1.5.6