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
 

Private Attributes

int _Myval
 
const error_category_Mycat
 

Member Typedef Documentation

Constructor & Destructor Documentation

error_condition::error_condition ( )
inline
297  : _Myval(0),
299  { // construct non-error
300  }
int _Myval
Definition: system_error:357
const error_category & generic_category() _NOEXCEPT
Definition: system_error:699
const error_category * _Mycat
Definition: system_error:358
error_condition::error_condition ( int  _Val,
const error_category _Cat 
)
inline
303  : _Myval(_Val), _Mycat(&_Cat)
304  { // construct from error code and category
305  }
int _Myval
Definition: system_error:357
const error_category * _Mycat
Definition: system_error:358
_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
311  : _Myval(0), _Mycat(0)
312  { // construct from enumerated error code
313  *this = make_error_condition(_Errcode); // using ADL
314  }
int _Myval
Definition: system_error:357
const error_category * _Mycat
Definition: system_error:358
error_condition make_error_condition(_Errc) _NOEXCEPT
Definition: system_error:481

Member Function Documentation

void error_condition::assign ( int  _Val,
const error_category _Cat 
)
inline
317  { // assign error code and category
318  _Myval = _Val;
319  _Mycat = &_Cat;
320  }
int _Myval
Definition: system_error:357
const error_category * _Mycat
Definition: system_error:358
_FwdIt const _Ty _Val
Definition: algorithm:1938
const error_category& error_condition::category ( ) const
inline
342  { // get category
343  return (*_Mycat);
344  }
const error_category * _Mycat
Definition: system_error:358
void error_condition::clear ( )
inline
331  { // assign non-error
332  _Myval = 0;
334  }
int _Myval
Definition: system_error:357
const error_category & generic_category() _NOEXCEPT
Definition: system_error:699
const error_category * _Mycat
Definition: system_error:358
string error_condition::message ( ) const
inline
347  { // get name of error code
348  return (category().message(value()));
349  }
const error_category & category() const _NOEXCEPT
Definition: system_error:341
string message() const
Definition: system_error:346
int value() const _NOEXCEPT
Definition: system_error:336
error_condition::operator bool ( ) const
inlineexplicit
352  { // test for actual error
353  return (value() != 0);
354  }
int value() const _NOEXCEPT
Definition: system_error:336
template<class _Enum >
enable_if<is_error_condition_enum<_Enum>::value, error_condition>::type& error_condition::operator= ( _Enum  _Errcode)
inline
325  { // assign enumerated error code
326  *this = make_error_condition(_Errcode); // using ADL
327  return (*this);
328  }
error_condition make_error_condition(_Errc) _NOEXCEPT
Definition: system_error:481
int error_condition::value ( ) const
inline
337  { // get error code
338  return (_Myval);
339  }
int _Myval
Definition: system_error:357

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: