rutz::value Class Reference

#include <rutz/value.h>

Inheritance diagram for rutz::value:

Inheritance graph

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.

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

References print_to().

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

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

Referenced by GbVec2< double >::GbVec2(), and GbVec3< double >::GbVec3().

The documentation for this class was generated from the following files:

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:56:47 2008 by Doxygen version 1.5.5.