eepgwde::detail::null0< T > Struct Template Reference
[Type Manipulation and Column Name re-mapping]

#include <eleve/src/typing1.hpp>

Inheritance diagram for eepgwde::detail::null0< T >:

eepgwde::detail::Renderer

List of all members.

Public Types

typedef null0< T > type
typedef T result_type

Public Member Functions

virtual const result_type operator() ()
virtual operator const boost::any & () const
 Return the null value in a boost::any.
virtual std::string name () const
virtual bool operator== (const boost::any &b) const
virtual bool operator!= (const boost::any &b) const
std::string ys (const boost::any &o) const throw (std::domain_error)
std::string null () const throw (std::domain_error)
virtual result_type xs (const std::string &o) const throw (std::domain_error)


Detailed Description

template<typename T>
struct eepgwde::detail::null0< T >

This template provides the functions for data-types wrapped in a boost::any.

The class provides a null value, this is templated to be suitable for the class.

It's a static visitor pattern.

Two other methods have been added that use a static visitor pattern to change render a passed object in different ways.

Note:
The type_traits are not used.

Definition at line 63 of file typing1.hpp.


Member Typedef Documentation

template<typename T>
typedef null0<T> eepgwde::detail::null0< T >::type

Definition at line 69 of file typing1.hpp.

template<typename T>
typedef T eepgwde::detail::null0< T >::result_type

Definition at line 70 of file typing1.hpp.


Member Function Documentation

template<typename T>
virtual const result_type eepgwde::detail::null0< T >::operator() (  )  [inline, virtual]

Return the null value. This is the only function result.

See also:
null1

Definition at line 75 of file typing1.hpp.

template<typename T>
virtual eepgwde::detail::null0< T >::operator const boost::any & (  )  const [inline, virtual]

Return the null value in a boost::any.

Definition at line 80 of file typing1.hpp.

template<typename T>
virtual std::string eepgwde::detail::null0< T >::name (  )  const [inline, virtual]

This returns the typeid as a string.

It uses the null1 function directly to return the name for the type.

Implements eepgwde::detail::Renderer.

Definition at line 89 of file typing1.hpp.

template<typename T>
virtual bool eepgwde::detail::null0< T >::operator== ( const boost::any &  b  )  const [inline, virtual]

Tests if this null0 has the same type the boost::any.

Matches the boost::any type name.

Definition at line 98 of file typing1.hpp.

template<typename T>
virtual bool eepgwde::detail::null0< T >::operator!= ( const boost::any &  b  )  const [inline, virtual]

Definition at line 104 of file typing1.hpp.

template<typename T>
std::string eepgwde::detail::null0< T >::ys ( const boost::any &  o  )  const throw (std::domain_error) [inline, virtual]

Try and convert a boost::any of the same type as this null0 to a string.

This is a static visitor to a set of methods in eepgwde::detail::i0

See also:
eepgwde::detail::i0::ys()

Implements eepgwde::detail::Renderer.

Definition at line 113 of file typing1.hpp.

template<typename T>
std::string eepgwde::detail::null0< T >::null (  )  const throw (std::domain_error) [inline, virtual]

Return a string representation of the null1 value.

This uses ys() and is usually called virtually via Renderer.

Implements eepgwde::detail::Renderer.

Definition at line 126 of file typing1.hpp.

template<typename T>
virtual result_type eepgwde::detail::null0< T >::xs ( const std::string &  o  )  const throw (std::domain_error) [inline, virtual]

Try and cast a boost::any of the same type as this null0 to its type.

This is a static visitor to a set of methods in eepgwde::detail::i0

I only pass the a to help the template definition.

See also:
eepgwde::detail::i0::xs() as()

Definition at line 140 of file typing1.hpp.

Referenced by eepgwde::detail::i0::zs0().


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

Generated on Thu Feb 18 21:30:12 2010 for eleve by  doxygen 1.5.6