Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

openvrml::vrml97_node::abstract_base Class Reference

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

Inheritance diagram for openvrml::vrml97_node::abstract_base:

Inheritance graph
[legend]
Collaboration diagram for openvrml::vrml97_node::abstract_base:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~abstract_base ()=0 throw ()
 Destroy.


Protected Member Functions

 abstract_base (const node_type &type, const scope_ptr &scope)
 Construct.


Private Member Functions

virtual void do_field (const std::string &id, const field_value &value) throw (unsupported_interface, std::bad_cast, std::bad_alloc)
 Set a field value for a node.

virtual const field_value & do_field (const std::string &id) const throw (unsupported_interface)
 Get a field value for a node.

virtual void do_process_event (const std::string &id, const field_value &value, double timestamp) throw (unsupported_interface, std::bad_cast, std::bad_alloc)
 Process an event.

virtual const field_value & do_eventout (const std::string &id) const throw (unsupported_interface)
 Get an eventOut value for a node.


Detailed Description

Abstract base class for VRML97 node implementations.

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


Constructor & Destructor Documentation

openvrml::vrml97_node::abstract_base::abstract_base (  const node_type &  type,
const scope_ptr &  scope
)  [protected]
 

Construct.

Parameters:
type the node_type associated with this node.
scope the scope to which the node belongs.

Member Function Documentation

const field_value & openvrml::vrml97_node::abstract_base::do_eventout (  const std::string &  id  )  const throw (unsupported_interface) [private, virtual]
 

Get an eventOut value for a node.

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

Implements openvrml::node.

const field_value & openvrml::vrml97_node::abstract_base::do_field (  const std::string &  id  )  const throw (unsupported_interface) [private, virtual]
 

Get a field value for a node.

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

Implements openvrml::node.

void openvrml::vrml97_node::abstract_base::do_field (  const std::string &  id,
const field_value &  value
)  throw (unsupported_interface, std::bad_cast, std::bad_alloc) [private, virtual]
 

Set a field value for a node.

Parameters:
id a field name.
value a field_value.
Exceptions:
unsupported_interface 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 openvrml::node.

void openvrml::vrml97_node::abstract_base::do_process_event (  const std::string &  id,
const field_value &  value,
double  timestamp
)  throw (unsupported_interface, std::bad_cast, std::bad_alloc) [private, virtual]
 

Process an event.

Parameters:
id an eventIn name.
value a field_value.
timestamp the current time.
Exceptions:
unsupported_interface 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 openvrml::node.