Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::fallback_to_default< DefaultT > Struct Template Reference

The fallback_to_default policy results in a default value if the attribute value cannot be extracted. More...

#include <fallback_policy_fwd.hpp>

Public Types

enum  { guaranteed_result = true }
 
typedef remove_cv< typename
remove_reference< DefaultT >
::type >::type 
default_type
 Default value type. More...
 

Public Member Functions

 fallback_to_default ()
 Default constructor. More...
 
 fallback_to_default (default_type const &def_val)
 Initializing constructor. More...
 
template<typename FunT >
bool apply_default (FunT &fun) const
 The method is called in order to apply a function object to the default value. More...
 
template<typename FunT >
bool apply_default (FunT const &fun) const
 The method is called in order to apply a function object to the default value. More...
 

Static Public Member Functions

static void on_invalid_type (type_info_wrapper const &)
 The method is called when value extraction failed because the attribute value has different type than requested. More...
 
static void on_missing_value ()
 The method is called when value extraction failed because the attribute value was not found. More...
 

Detailed Description

template<typename DefaultT>
struct boost::fallback_to_default< DefaultT >

The fallback_to_default policy results in a default value if the attribute value cannot be extracted.

Member Typedef Documentation

template<typename DefaultT >
typedef remove_cv< typename remove_reference< DefaultT >::type >::type boost::fallback_to_default< DefaultT >::default_type

Default value type.

Member Enumeration Documentation

template<typename DefaultT >
anonymous enum
Enumerator
guaranteed_result 

Constructor & Destructor Documentation

template<typename DefaultT >
boost::fallback_to_default< DefaultT >::fallback_to_default ( )
inline

Default constructor.

template<typename DefaultT >
boost::fallback_to_default< DefaultT >::fallback_to_default ( default_type const &  def_val)
inlineexplicit

Initializing constructor.

Member Function Documentation

template<typename DefaultT >
template<typename FunT >
bool boost::fallback_to_default< DefaultT >::apply_default ( FunT &  fun) const
inline

The method is called in order to apply a function object to the default value.

template<typename DefaultT >
template<typename FunT >
bool boost::fallback_to_default< DefaultT >::apply_default ( FunT const &  fun) const
inline

The method is called in order to apply a function object to the default value.

template<typename DefaultT >
static void boost::fallback_to_default< DefaultT >::on_invalid_type ( type_info_wrapper const &  )
inlinestatic

The method is called when value extraction failed because the attribute value has different type than requested.

template<typename DefaultT >
static void boost::fallback_to_default< DefaultT >::on_missing_value ( )
inlinestatic

The method is called when value extraction failed because the attribute value was not found.


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