Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

SFString Class Reference

Encapsulates an SFString. More...

Inheritance diagram for SFString:

FieldValue List of all members.

Public Methods

 SFString (const std::string &value=std::string()) throw (std::bad_alloc)
 Constructor.

virtual ~SFString () throw ()
 Destructor.

const std::string & get () const throw ()
 Get value.

void set (const std::string &value) throw (std::bad_alloc)
 Set value.

virtual std::auto_ptr< FieldValueclone () const throw (std::bad_alloc)
 Virtual copy constructor.

virtual FieldValueassign (const FieldValue &value) throw (std::bad_cast, std::bad_alloc)
 Virtual assignment.

virtual Type type () const throw ()
 Get the FieldValue::Type associated with this class.


Private Methods

virtual void print (std::ostream &) const
 Print to an output stream.


Private Attributes

std::string value

Detailed Description

Encapsulates an SFString.


Constructor & Destructor Documentation

SFString const std::string &    value = std::string() throw (std::bad_alloc) [explicit]
 

Constructor.

Parameters:
value 
Exceptions:
std::bad_alloc if memory allocation fails.

~SFString   throw () [virtual]
 

Destructor.


Member Function Documentation

FieldValue & assign const FieldValue   value throw (std::bad_cast, std::bad_alloc) [virtual]
 

Virtual assignment.

Parameters:
value the new value to give the object.
Returns:
a reference to the object.
Exceptions:
std::bad_cast if value is not an SFString.
std::bad_alloc if memory allocation fails.

Implements FieldValue.

std::auto_ptr< FieldValue > clone   const throw (std::bad_alloc) [virtual]
 

Virtual copy constructor.

Returns:
a pointer to a copy of the object.
Exceptions:
std::bad_alloc if memory allocation fails.

Implements FieldValue.

const std::string & get   const throw ()
 

Get value.

Returns:
a string

void print std::ostream &    out const [private, virtual]
 

Print to an output stream.

Parameters:
out an output stream.

Implements FieldValue.

void set const std::string &    value throw (std::bad_alloc)
 

Set value.

Parameters:
value 
Exceptions:
std::bad_alloc if memory allocation fails.

FieldValue::Type type   const throw () [virtual]
 

Get the FieldValue::Type associated with this class.

Returns:
FieldValue::sfstring.

Implements FieldValue.