Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::visitation_result Class Reference

The class represents attribute value visitation result. More...

#include <value_visitation.hpp>

Public Types

enum  error_code {
  ok,
  value_not_found,
  value_has_invalid_type
}
 Error codes for attribute value visitation. More...
 

Public Member Functions

BOOST_CONSTEXPR visitation_result (error_code code=ok) BOOST_NOEXCEPT
 Initializing constructor. More...
 
bool operator! () const BOOST_NOEXCEPT
 Checks if the visitation was successful. More...
 
error_code code () const BOOST_NOEXCEPT
 

Detailed Description

The class represents attribute value visitation result.

The main purpose of this class is to provide a convenient interface for checking whether the attribute value visitation succeeded or not. It also allows to discover the actual cause of failure, should the operation fail.

Member Enumeration Documentation

Error codes for attribute value visitation.

Enumerator
ok 

The attribute value has been visited successfully.

value_not_found 

The attribute value is not present in the view.

value_has_invalid_type 

The attribute value is present in the view, but has an unexpected type.

Constructor & Destructor Documentation

BOOST_CONSTEXPR boost::visitation_result::visitation_result ( error_code  code = ok)
inline

Initializing constructor.

Creates the result that is equivalent to the specified error code.

Member Function Documentation

error_code boost::visitation_result::code ( ) const
inline
Returns
The actual result code of value visitation
bool boost::visitation_result::operator! ( ) const
inline

Checks if the visitation was successful.

Returns
true if the value was visited successfully, false otherwise.

Checks if the visitation was unsuccessful.

Returns
false if the value was visited successfully, true otherwise.

References ok.


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