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

openvrml::node_type Class Reference

Type information object for nodes. More...

Inheritance diagram for openvrml::node_type:

Inheritance graph
[legend]
Collaboration diagram for openvrml::node_type:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

field_value::type_id has_eventin (const std::string &id) const throw ()
 Determine if the node type has an eventIn.

field_value::type_id has_eventout (const std::string &id) const throw ()
 Determine if the node type has an eventOut.

field_value::type_id has_field (const std::string &id) const throw ()
 Determine if the node type has a field.

field_value::type_id has_exposedfield (const std::string &id) const throw ()
 Determine if the node type has an exposedField.

virtual const node_interface_setinterfaces () const=0 throw ()
 Get the set of interfaces for the node_type.

virtual const node_ptr create_node (const scope_ptr &scope) const=0 throw (std::bad_alloc)
 Create a new node with this node_type.


Public Attributes

openvrml::node_class & node_class
 The class object associated with the node_type.

const std::string id
 The name of the node_type.


Protected Member Functions

 node_type (openvrml::node_class &c, const std::string &id) throw (std::bad_alloc)
 Constructor.


Detailed Description

Type information object for nodes.


Constructor & Destructor Documentation

openvrml::node_type::~node_type  )  throw () [pure virtual]
 

Destructor.

openvrml::node_type::node_type openvrml::node_class c,
const std::string &  id
throw (std::bad_alloc) [protected]
 

Constructor.

Parameters:
c the class object associated with the node_type.
id the name for the node_type.
Exceptions:
std::bad_alloc if memory allocation fails.

Member Function Documentation

const node_ptr openvrml::node_type::create_node const scope_ptr scope  )  const throw (std::bad_alloc) [pure virtual]
 

Create a new node with this node_type.

Parameters:
scope the Scope that the new node should belong to.
Returns:
a node_ptr to a new node.
Exceptions:
std::bad_alloc if memory allocation fails.

Implemented in openvrml::script_node::script_node_type.

field_value::type_id openvrml::node_type::has_eventin const std::string &  id  )  const throw ()
 

Determine if the node type has an eventIn.

If the node type supports an eventIn named id, this method will return the type identifier corresponding to the data type handled by the eventIn. Note that the actual interface type that supports the eventIn may be either an eventIn or an exposedField.

Parameters:
id the name of the eventIn.
Returns:
the data type of the eventIn, or field_value::invalid_type_id if no such eventIn exists.

field_value::type_id openvrml::node_type::has_eventout const std::string &  id  )  const throw ()
 

Determine if the node type has an eventOut.

If the node type supports an eventOut named id, this method will return the type identifier corresponding to the data type handled by the eventOut. Note that the actual interface type that supports the eventOut may be either an eventOut or an exposedField.

Parameters:
id the name of the eventOut.
Returns:
the data type of the eventOut, or field_value::invalid_type_id if no such eventOut exists.

field_value::type_id openvrml::node_type::has_exposedfield const std::string &  id  )  const throw ()
 

Determine if the node type has an exposedField.

If the node type has an exposedField named id, this method will return the type identifier corresponding to the data type handled by the exposedField.

Parameters:
id the name of the exposedField.
Returns:
the data type of the exposedField, or field_value::invalid_type_id if no such exposedField exists.

field_value::type_id openvrml::node_type::has_field const std::string &  id  )  const throw ()
 

Determine if the node type has a field.

If the node type has a field named id, this method will return the type identifier corresponding to the data type accepted by the field.

Parameters:
id the name of the field.
Returns:
the data type of the field, or field_value::invalid_type_id if no such field exists.

const node_interface_set & openvrml::node_type::interfaces  )  const throw () [pure virtual]
 

Get the set of interfaces for the node_type.

Returns:
the set of interfaces.

Implemented in openvrml::script_node::script_node_type.


Member Data Documentation

const std::string openvrml::node_type::id
 

The name of the node_type.

openvrml::node_class & openvrml::node_type::node_class
 

The class object associated with the node_type.