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

SFNode Class Reference

Encapsulates an SFNode. More...

Inheritance diagram for SFNode:

FieldValue List of all members.

Public Methods

 SFNode (const NodePtr &node=NodePtr(0)) throw ()
 Constructor.

virtual ~SFNode () throw ()
 Destructor.

const NodePtrget () const throw ()
 Get value.

void set (const NodePtr &node) throw ()
 Set value.

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

virtual FieldValueassign (const FieldValue &value) throw (std::bad_cast)
 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

NodePtr node

Detailed Description

Encapsulates an SFNode.


Constructor & Destructor Documentation

SFNode const NodePtr   node = NodePtr(0) throw () [explicit]
 

Constructor.

Parameters:
node a NodePtr

~SFNode   throw () [virtual]
 

Destructor.


Member Function Documentation

FieldValue & assign const FieldValue   value throw (std::bad_cast) [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 SFNode.

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 NodePtr & get   const throw ()
 

Get value.

Returns:
a smart pointer to this object's Node

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

Print to an output stream.

Parameters:
out an output stream.

Implements FieldValue.

void set const NodePtr   node throw ()
 

Set value.

Parameters:
node a smart pointer to a Node, or to 0 if setting this SFNode to NULL.

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

Get the FieldValue::Type associated with this class.

Returns:
FieldValue::sfnode.

Implements FieldValue.