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

AbstractBase Class Reference

Abstract base class for VRML97 node implementations. More...

Inheritance diagram for AbstractBase:

Node AbstractChild AbstractGeometry AbstractTexture Appearance AudioClip Color Coordinate FontStyle Material Normal TextureCoordinate TextureTransform List of all members.

Public Methods

virtual ~AbstractBase ()=0 throw ()
 Destructor.


Protected Methods

 AbstractBase (const NodeType &nodeType, const ScopePtr &scope)
 Constructor.


Private Methods

virtual void setFieldImpl (const std::string &id, const FieldValue &value) throw (UnsupportedInterface, std::bad_cast, std::bad_alloc)
 Set a field value for a node.

virtual const FieldValuegetFieldImpl (const std::string &id) const throw (UnsupportedInterface)
 Get a field value for a node.

virtual void processEventImpl (const std::string &id, const FieldValue &value, double timestamp) throw (UnsupportedInterface, std::bad_cast, std::bad_alloc)
 Process an event.

virtual const FieldValuegetEventOutImpl (const std::string &id) const throw (UnsupportedInterface)
 Get an eventOut value for a node.


Detailed Description

Abstract base class for VRML97 node implementations.

AbstractBase encapsulates the mechanisms for field access and mutation, event dispatch, and eventOut access.


Constructor & Destructor Documentation

~AbstractBase   throw () [pure virtual]
 

Destructor.

AbstractBase const NodeType   nodeType,
const ScopePtr   scope
[protected]
 

Constructor.

Parameters:
nodeType the NodeType associated with this node.
scope the Scope to which the node belongs.

Member Function Documentation

const FieldValue & getEventOutImpl const std::string &    id const throw (UnsupportedInterface) [private, virtual]
 

Get an eventOut value for a node.

Parameters:
id an eventOut name.
Exceptions:
UnsupportedInterface if the node has no eventOut id.

Implements Node.

const FieldValue & getFieldImpl const std::string &    id const throw (UnsupportedInterface) [private, virtual]
 

Get a field value for a node.

Parameters:
id a field name.
Exceptions:
UnsupportedInterface if the node has no field id.

Implements Node.

void processEventImpl const std::string &    id,
const FieldValue   value,
double    timestamp
throw (UnsupportedInterface, std::bad_cast, std::bad_alloc) [private, virtual]
 

Process an event.

Parameters:
id an eventIn name.
value a FieldValue.
timestamp the current time.
Exceptions:
UnsupportedInterface if the node has no eventIn id.
std::bad_cast if value is not the correct type.
std::bad_alloc if memory allocation fails.
Precondition:
value must be of the correct type.

Implements Node.

void setFieldImpl const std::string &    id,
const FieldValue   value
throw (UnsupportedInterface, std::bad_cast, std::bad_alloc) [private, virtual]
 

Set a field value for a node.

Parameters:
id a field name.
value a FieldValue.
Exceptions:
UnsupportedInterface if the node has no field id.
std::bad_cast if value is not the correct type.
std::bad_alloc if memory allocation fails.
Precondition:
value must be of the correct type.

Implements Node.