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

Private Attributes

int _Myval
 
const error_category_Mycat
 

Member Typedef Documentation

Constructor & Destructor Documentation

error_code::error_code ( )
inline
224  : _Myval(0),
226  { // construct non-error
227  }
const error_category & system_category() _NOEXCEPT
Definition: system_error:709
int _Myval
Definition: system_error:286
const error_category * _Mycat
Definition: system_error:287
error_code::error_code ( int  _Val,
const error_category _Cat 
)
inline
230  : _Myval(_Val), _Mycat(&_Cat)
231  { // construct from error code and category
232  }
int _Myval
Definition: system_error:286
const error_category * _Mycat
Definition: system_error:287
_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
238  : _Myval(0), _Mycat(0)
239  { // construct from enumerated error code
240  *this = make_error_code(_Errcode); // using ADL
241  }
int _Myval
Definition: system_error:286
const error_category * _Mycat
Definition: system_error:287
error_code make_error_code(_Errc) _NOEXCEPT
Definition: system_error:470

Member Function Documentation

void error_code::assign ( int  _Val,
const error_category _Cat 
)
inline
244  { // assign error code and category
245  _Myval = _Val;
246  _Mycat = &_Cat;
247  }
int _Myval
Definition: system_error:286
const error_category * _Mycat
Definition: system_error:287
_FwdIt const _Ty _Val
Definition: algorithm:1938
const error_category& error_code::category ( ) const
inline
269  { // get category
270  return (*_Mycat);
271  }
const error_category * _Mycat
Definition: system_error:287
void error_code::clear ( )
inline
258  { // assign non-error
259  _Myval = 0;
260  _Mycat = &system_category();
261  }
const error_category & system_category() _NOEXCEPT
Definition: system_error:709
int _Myval
Definition: system_error:286
const error_category * _Mycat
Definition: system_error:287
error_condition error_code::default_error_condition ( ) const
inline
465  { // make error_condition for error code
466  return (category().default_error_condition(value()));
467  }
int value() const _NOEXCEPT
Definition: system_error:263
const error_category & category() const _NOEXCEPT
Definition: system_error:268
error_condition default_error_condition() const _NOEXCEPT
Definition: system_error:464
string error_code::message ( ) const
inline
276  { // get name of error code
277  return (category().message(value()));
278  }
int value() const _NOEXCEPT
Definition: system_error:263
const error_category & category() const _NOEXCEPT
Definition: system_error:268
string message() const
Definition: system_error:275
error_code::operator bool ( ) const
inlineexplicit
281  { // test for actual error
282  return (value() != 0);
283  }
int value() const _NOEXCEPT
Definition: system_error:263
template<class _Enum >
enable_if<is_error_code_enum<_Enum>::value, error_code>::type& error_code::operator= ( _Enum  _Errcode)
inline
252  { // assign enumerated error code
253  *this = make_error_code(_Errcode); // using ADL
254  return (*this);
255  }
error_code make_error_code(_Errc) _NOEXCEPT
Definition: system_error:470
int error_code::value ( ) const
inline
264  { // get error code
265  return (_Myval);
266  }
int _Myval
Definition: system_error:286

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: