#include <eleve/src/typing1.hpp>
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) |
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.
Definition at line 63 of file typing1.hpp.
typedef null0<T> eepgwde::detail::null0< T >::type |
Definition at line 69 of file typing1.hpp.
typedef T eepgwde::detail::null0< T >::result_type |
Definition at line 70 of file typing1.hpp.
virtual const result_type eepgwde::detail::null0< T >::operator() | ( | ) | [inline, virtual] |
Return the null value. This is the only function result.
Definition at line 75 of file typing1.hpp.
virtual eepgwde::detail::null0< T >::operator const boost::any & | ( | ) | const [inline, virtual] |
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.
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.
virtual bool eepgwde::detail::null0< T >::operator!= | ( | const boost::any & | b | ) | const [inline, virtual] |
Definition at line 104 of file typing1.hpp.
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
Implements eepgwde::detail::Renderer.
Definition at line 113 of file typing1.hpp.
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.
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.
Definition at line 140 of file typing1.hpp.
Referenced by eepgwde::detail::i0::zs0().