STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Attributes | List of all members
error_code Class Reference

Public Types

typedef error_code _Myt
 

Public Member Functions

 error_code ()
 
 error_code (int _Val, const error_category &_Cat)
 
template<class _Enum , class = typename enable_if<is_error_code_enum<_Enum>::value, void>::type>
 error_code (_Enum _Errcode)
 
void assign (int _Val, const error_category &_Cat)
 
template<class _Enum >
enable_if< is_error_code_enum< _Enum >::value, error_code >::type & operator= (_Enum _Errcode)
 
void clear () _NOEXCEPT
 
int value () const
 
const error_categorycategory () const
 
error_condition default_error_condition () const
 
string message () const
 
 operator bool () const _NOEXCEPT
 
bool operator== (const error_code &_Right) const _NOEXCEPT
 
bool operator!= (const error_code &_Right) const _NOEXCEPT
 
bool operator< (const error_code &_Right) const _NOEXCEPT
 

Private Attributes

int _Myval
 
const error_category_Mycat
 

Member Typedef Documentation

Constructor & Destructor Documentation

error_code::error_code ( )
inline
201  : _Myval(0),
203  { // construct non-error
204  }
const error_category & system_category() _NOEXCEPT
Definition: system_error:651
int _Myval
Definition: system_error:281
const error_category * _Mycat
Definition: system_error:282
error_code::error_code ( int  _Val,
const error_category _Cat 
)
inline
207  : _Myval(_Val), _Mycat(&_Cat)
208  { // construct from error code and category
209  }
int _Myval
Definition: system_error:281
const error_category * _Mycat
Definition: system_error:282
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Enum , class = typename enable_if<is_error_code_enum<_Enum>::value, void>::type>
error_code::error_code ( _Enum  _Errcode)
inline
215  : _Myval(0), _Mycat(0)
216  { // construct from enumerated error code
217  *this = make_error_code(_Errcode); // using ADL
218  }
error_code make_error_code(generic_errno) _NOEXCEPT
Definition: system_error:434
int _Myval
Definition: system_error:281
const error_category * _Mycat
Definition: system_error:282

Member Function Documentation

void error_code::assign ( int  _Val,
const error_category _Cat 
)
inline
221  { // assign error code and category
222  _Myval = _Val;
223  _Mycat = &_Cat;
224  }
int _Myval
Definition: system_error:281
const error_category * _Mycat
Definition: system_error:282
_FwdIt const _Ty _Val
Definition: algorithm:1938
const error_category& error_code::category ( ) const
inline
246  { // get category
247  return (*_Mycat);
248  }
const error_category * _Mycat
Definition: system_error:282
void error_code::clear ( )
inline
235  { // assign non-error
236  _Myval = 0;
237  _Mycat = &system_category();
238  }
const error_category & system_category() _NOEXCEPT
Definition: system_error:651
int _Myval
Definition: system_error:281
const error_category * _Mycat
Definition: system_error:282
error_condition error_code::default_error_condition ( ) const
inline
397  { // make error_condition for error code
398  return (category().default_error_condition(value()));
399  }
int value() const
Definition: system_error:240
const error_category & category() const
Definition: system_error:245
error_condition default_error_condition() const
Definition: system_error:396
string error_code::message ( ) const
inline
253  { // get name of error code
254  return (category().message(value()));
255  }
int value() const
Definition: system_error:240
const error_category & category() const
Definition: system_error:245
string message() const
Definition: system_error:252
error_code::operator bool ( ) const
inlineexplicit
258  { // test for actual error
259  return (value() != 0);
260  }
int value() const
Definition: system_error:240
bool error_code::operator!= ( const error_code _Right) const
inline
269  { // test if *this != _Right
270  return (!(*this == _Right));
271  }
bool error_code::operator< ( const error_code _Right) const
inline
274  { // test if *this == _Right
275  return (category() < _Right.category()
276  || (category() == _Right.category()
277  && value() < _Right.value()));
278  }
int value() const
Definition: system_error:240
const error_category & category() const
Definition: system_error:245
template<class _Enum >
enable_if<is_error_code_enum<_Enum>::value, error_code>::type& error_code::operator= ( _Enum  _Errcode)
inline
229  { // assign enumerated error code
230  *this = make_error_code(_Errcode); // using ADL
231  return (*this);
232  }
error_code make_error_code(generic_errno) _NOEXCEPT
Definition: system_error:434
bool error_code::operator== ( const error_code _Right) const
inline
263  { // test if *this == _Right
264  return (category() == _Right.category()
265  && value() == _Right.value());
266  }
int value() const
Definition: system_error:240
const error_category & category() const
Definition: system_error:245
int error_code::value ( ) const
inline
241  { // get error code
242  return (_Myval);
243  }
int _Myval
Definition: system_error:281

Member Data Documentation

const error_category* error_code::_Mycat
private
int error_code::_Myval
private

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