DigitalSpaces::Variant::getGenericVisitor< GetType > Struct Template Reference

Inherits boost::static_visitor< GetType & >.


Detailed Description

template<typename GetType>
struct DigitalSpaces::Variant::getGenericVisitor< GetType >

Generic visitor that returns the value if its the right type, otherwise returns a provided "bad" (or default) value.

Note:
Possibly could be done with using get, with a catch. This way is done at compile time, though?

Public Member Functions

 getGenericVisitor (GetType badValue)
template<typename incorrect_type>
GetType & operator() (incorrect_type &) const
template<>
GetType & operator() (GetType &value) const

Data Fields

GetType & _badValue

Constructor & Destructor Documentation

template<typename GetType>
DigitalSpaces::Variant::getGenericVisitor< GetType >::getGenericVisitor ( GetType  badValue  )  [inline]


Member Function Documentation

template<typename GetType>
template<typename incorrect_type>
GetType& DigitalSpaces::Variant::getGenericVisitor< GetType >::operator() ( incorrect_type &   )  const [inline]

template<typename GetType>
template<>
GetType& DigitalSpaces::Variant::getGenericVisitor< GetType >::operator() ( GetType &  value  )  const [inline]


Field Documentation

template<typename GetType>
GetType& DigitalSpaces::Variant::getGenericVisitor< GetType >::_badValue


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

Generated on Sun Aug 31 17:46:32 2008 for Digital Spaces by  doxygen 1.5.6