Home | Download | Screen shots | Discussion | Documentation
--- | --- | --- | --- | ---

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

# openvrml::node_type Class Reference
[Nodes]

Inheritance diagram for openvrml::node_type:

[legend]
List of all members.

## Detailed Description

Type information object for `node`s.

## Public Member Functions

virtual | ~node_type ()=0 throw ()
| Destructor.
const openvrml::node_class & | node_class () const throw ()
| The class object associated with the `node_type`.
const std::string & | id () const throw ()
| The name of the `node_type`.
const node_interface_set & | interfaces () const throw ()
| Get the set of interfaces for the `node_type`.
const node_ptr | create_node (const boost::shared_ptr< scope > &scope, const initial_value_map &initial_values=initial_value_map()) const throw (unsupported_interface, std::bad_cast, std::bad_alloc)

## Protected Member Functions

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

## Private Member Functions

virtual const node_interface_set & | do_interfaces () const =0 throw ()
| Get the set of interfaces for the `node_type`.
virtual const node_ptr | do_create_node (const boost::shared_ptr< scope > &scope, const initial_value_map &initial_values) const =0 throw (unsupported_interface, std::bad_cast, std::bad_alloc)

## Private Attributes

const openvrml::node_class & | node_class_
| The class object associated with the `node_type`.
const std::string | id_
| The name of the `node_type`.

## Constructor & Destructor Documentation

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

| Destructor.

openvrml::node_type::node_type | ( | const 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_class & openvrml::node_type::node_class | ( |  | ) | const throw ()

The class object associated with the `node_type`.

Returns:
  the class object associated with the `node_type`.

const std::string & openvrml::node_type::id | ( |  | ) | const throw ()

The name of the `node_type`.

Returns:
  the name of the `node_type`.

const node_interface_set & openvrml::node_type::interfaces | ( |  | ) | const throw ()

Get the set of interfaces for the `node_type`.

This function delegates to `node_type::do_interfaces`.

Returns:
  the set of interfaces.

const node_interface_set & openvrml::node_type::do_interfaces | ( |  | ) | const throw ()`[private, pure virtual]`

Get the set of interfaces for the `node_type`.

Subclasses must implement this function.

Returns:
  the set of interfaces.

Implemented in openvrml::script_node::script_node_type.

## Member Data Documentation

openvrml::node_class & openvrml::node_type::node_class_`[private]`

| The class object associated with the `node_type`. For internal use only.

const std::string openvrml::node_type::id_`[private]`

| The name of the `node_type`. For internal use only.