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_condition Class Reference

Public Types

typedef error_condition _Myt
 

Public Member Functions

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

Private Attributes

int _Myval
 
const error_category_Mycat
 

Member Typedef Documentation

Constructor & Destructor Documentation

error_condition::error_condition ( )
inline
292  : _Myval(0),
294  { // construct non-error
295  }
int _Myval
Definition: system_error:370
const error_category & generic_category() _NOEXCEPT
Definition: system_error:641
const error_category * _Mycat
Definition: system_error:371
error_condition::error_condition ( int  _Val,
const error_category _Cat 
)
inline
298  : _Myval(_Val), _Mycat(&_Cat)
299  { // construct from error code and category
300  }
int _Myval
Definition: system_error:370
const error_category * _Mycat
Definition: system_error:371
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Enum , class = typename enable_if<is_error_condition_enum<_Enum>::value, void>::type>
error_condition::error_condition ( _Enum  _Errcode)
inline
306  : _Myval(0), _Mycat(0)
307  { // construct from enumerated error code
308  *this = make_error_condition(_Errcode); // using ADL
309  }
error_condition make_error_condition(generic_errno) _NOEXCEPT
Definition: system_error:445
int _Myval
Definition: system_error:370
const error_category * _Mycat
Definition: system_error:371

Member Function Documentation

void error_condition::assign ( int  _Val,
const error_category _Cat 
)
inline
312  { // assign error code and category
313  _Myval = _Val;
314  _Mycat = &_Cat;
315  }
int _Myval
Definition: system_error:370
const error_category * _Mycat
Definition: system_error:371
_FwdIt const _Ty _Val
Definition: algorithm:1938
const error_category& error_condition::category ( ) const
inline
337  { // get category
338  return (*_Mycat);
339  }
const error_category * _Mycat
Definition: system_error:371
void error_condition::clear ( )
inline
326  { // assign non-error
327  _Myval = 0;
329  }
int _Myval
Definition: system_error:370
const error_category & generic_category() _NOEXCEPT
Definition: system_error:641
const error_category * _Mycat
Definition: system_error:371
string error_condition::message ( ) const
inline
342  { // get name of error code
343  return (category().message(value()));
344  }
const error_category & category() const _NOEXCEPT
Definition: system_error:336
string message() const
Definition: system_error:341
int value() const _NOEXCEPT
Definition: system_error:331
error_condition::operator bool ( ) const
inlineexplicit
347  { // test for actual error
348  return (value() != 0);
349  }
int value() const _NOEXCEPT
Definition: system_error:331
bool error_condition::operator!= ( const error_condition _Right) const
inline
358  { // test if *this != _Right
359  return (!(*this == _Right));
360  }
bool error_condition::operator< ( const error_condition _Right) const
inline
363  { // test if *this == _Right
364  return (category() < _Right.category()
365  || (category() == _Right.category()
366  && value() < _Right.value()));
367  }
const error_category & category() const _NOEXCEPT
Definition: system_error:336
int value() const _NOEXCEPT
Definition: system_error:331
template<class _Enum >
enable_if<is_error_condition_enum<_Enum>::value, error_condition>::type& error_condition::operator= ( _Enum  _Errcode)
inline
320  { // assign enumerated error code
321  *this = make_error_condition(_Errcode); // using ADL
322  return (*this);
323  }
error_condition make_error_condition(generic_errno) _NOEXCEPT
Definition: system_error:445
bool error_condition::operator== ( const error_condition _Right) const
inline
352  { // test if *this == _Right
353  return (category() == _Right.category()
354  && value() == _Right.value());
355  }
const error_category & category() const _NOEXCEPT
Definition: system_error:336
int value() const _NOEXCEPT
Definition: system_error:331
int error_condition::value ( ) const
inline
332  { // get error code
333  return (_Myval);
334  }
int _Myval
Definition: system_error:370

Member Data Documentation

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

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