rutz::value Class Reference

#include <rutz/value.h>

List of all members.

Public Member Functions

 value ()
 Default constructor.
virtual ~value ()
 Virtual destructor ensures proper destruction of base classes.
virtual rutz::fstring value_typename () const =0
 Return a string giving the name of the native type.
virtual void print_to (std::ostream &os) const =0
 Write the value to a std::ostream.
virtual void scan_from (std::istream &is)=0
 Read the value from a std::istream.
rutz::fstring get_string () const
 Get an rutz::fstring representation of the value.
void set_string (rutz::fstring val)
 Set the value from an rutz::fstring.

Detailed Description

rutz::value defines an interface for variant-type value objects that can be converted to+from a string representation. Subclasses may allow conversion among types so that a value of any basic type can be retrieved, or they may allow only one basic type to be retrieved.

Definition at line 57 of file value.h.


Constructor & Destructor Documentation

GVX_DBG_REGISTER rutz::value::value (  ) 

Default constructor.

Definition at line 48 of file value.cc.

rutz::value::~value (  )  [virtual]

Virtual destructor ensures proper destruction of base classes.

Definition at line 53 of file value.cc.


Member Function Documentation

rutz::fstring rutz::value::get_string (  )  const

Get an rutz::fstring representation of the value.

Builds a string stream, calls print_to(), and returns its value.

Definition at line 58 of file value.cc.

References print_to().

virtual void rutz::value::print_to ( std::ostream &  os  )  const [pure virtual]

Write the value to a std::ostream.

Referenced by get_string().

virtual void rutz::value::scan_from ( std::istream &  is  )  [pure virtual]

Read the value from a std::istream.

Referenced by set_string().

void rutz::value::set_string ( rutz::fstring  val  ) 

Set the value from an rutz::fstring.

Builds a string stream from val and calling scan_from() with it.

Definition at line 66 of file value.cc.

References rutz::fstring::c_str(), and scan_from().

virtual rutz::fstring rutz::value::value_typename (  )  const [pure virtual]

Return a string giving the name of the native type.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:44:44 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3