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

# openvrml::node Class Reference

A `node` in the scene graph. More...

`#include <openvrml/node.h>`

Inheritance diagram for openvrml::node:
[legend]

List of all members.

## Public Member Functions

virtual | ~node ()=0 throw ()
| Destructor.
void | add_ref () const throw ()
| Increment the reference count.
void | remove_ref () const throw ()
| Decrement the reference count.
void | release () const throw ()
| Decrement the reference count; destroy the instance if the count drops to zero.
size_t | use_count () const throw ()
| The number of owning references to the instance.
const node_type & | type () const throw ()
| The type information object for the `node`.
const std::string & | id () const throw ()
| Retrieve the name of this `node`.
void | id (const std::string &node_id) throw ( std::bad_alloc )
| Set the name of the `node`.
const openvrml::scope & | scope () const throw ()
| Get the `scope` to which the `node` belongs.
openvrml::scene * | scene () const throw ()
| Get the `scene` with which the `node` is associated.
const std::vector < boost::intrusive_ptr< node > > & | impl_nodes () const throw ()
| Get the implementation nodes of a `PROTO` instance.
std::ostream & | print (std::ostream &out, size_t indent) const
| Pretty print.
void | initialize (openvrml::scene &scene, double timestamp) throw ( std::bad_alloc )
| Initialize the node.
std::auto_ptr< field_value > | field (const std::string &id) const throw ( unsupported_interface , std::bad_alloc )
| Generalized field accessor.
template<typename FieldValue >
const FieldValue | field (const std::string &id) const throw ( unsupported_interface , std::bad_cast )
openvrml::event_listener & | event_listener (const std::string &id) throw ( unsupported_interface )
| Get an event listener.
template<typename FieldValue >
field_value_listener < FieldValue > & | event_listener (const std::string &id) throw ( unsupported_interface , std::bad_cast )
openvrml::event_emitter & | event_emitter (const std::string &id) throw ( unsupported_interface )
| Get an event emitter.
template<typename FieldValue >
field_value_emitter< FieldValue > & | event_emitter (const std::string &id) throw ( unsupported_interface , std::bad_cast )
void | shutdown (double timestamp) throw ()
| Shut down the node.
bool | modified () const throw ( boost::thread_resource_error )
| Determine whether the `node` has been modified.
void | modified (bool value) throw ( boost::thread_resource_error )
| Set the modified flag.

## Static Public Attributes

static const boost::intrusive_ptr< node > | self_tag
| Special value used when initializing a `script_node`.

## Protected Member Functions

| node (const node_type &type, const boost::shared_ptr< openvrml::scope > &scope) throw ()
| Construct.
boost::shared_mutex & | scene_mutex ()
| The `scene` mutex.

## Static Protected Member Functions

static void | emit_event (openvrml::event_emitter &emitter, double timestamp) throw ( std::bad_alloc )
| Emit an event.

## Private Member Functions

virtual const std::vector < boost::intrusive_ptr< node > > & | do_impl_nodes () const throw ()
| Get the implementation nodes of a `PROTO` instance.
virtual void | do_initialize (double timestamp) throw ( std::bad_alloc )
| `node` subclass-specific initialization.
virtual const field_value & | do_field (const std::string &id) const =0 throw ( unsupported_interface )
| Called by `node::field` to get a `field`.
virtual openvrml::event_listener & | do_event_listener (const std::string &id)=0 throw ( unsupported_interface )
| Get an event listener.
virtual openvrml::event_emitter & | do_event_emitter (const std::string &id)=0 throw ( unsupported_interface )
| Get an event emitter.
virtual void | do_shutdown (double timestamp) throw ()
| Called by node::shutdown.
virtual bool | do_modified () const throw ( boost::thread_resource_error )
| Determine whether the `node` has been modified.
virtual script_node * | to_script () throw ()
| Cast to a `script_node`.
virtual appearance_node * | to_appearance () throw ()
| Cast to an `appearance_node`.
virtual background_node * | to_background () throw ()
| Cast to a `background_node`.
virtual bounded_volume_node * | to_bounded_volume () throw ()
| Cast to a `bounded_volume_node`.
virtual child_node * | to_child () throw ()
| Cast to a `child_node`.
virtual color_node * | to_color () throw ()
| Cast to a `color_node`.
virtual color_rgba_node * | to_color_rgba () throw ()
| Cast to a `color_rgba_node`.
virtual coordinate_node * | to_coordinate () throw ()
| Cast to a `coordinate_node`.
virtual font_style_node * | to_font_style () throw ()
| Cast to a font_style_node.
virtual geometry_node * | to_geometry () throw ()
| Cast to a geometry_node.
virtual grouping_node * | to_grouping () throw ()
| Cast to a `grouping_node`.
virtual light_node * | to_light () throw ()
| Cast to a `light_node`.
virtual material_node * | to_material () throw ()
| Cast to a `material_node`.
virtual navigation_info_node * | to_navigation_info () throw ()
| Cast to a `navigation_info_node`.
virtual normal_node * | to_normal () throw ()
| Cast to a `normal_node`.
virtual pointing_device_sensor_node * | to_pointing_device_sensor () throw ()
| Cast to a `pointing_device_sensor_node`.
virtual scoped_light_node * | to_scoped_light () throw ()
| Cast to a `scoped_light_node`.
virtual sound_source_node * | to_sound_source () throw ()
| Cast to a `sound_source_node`.
virtual texture_node * | to_texture () throw ()
| Cast to a `texture_node`.
virtual texture_coordinate_node * | to_texture_coordinate () throw ()
| Cast to a `texture_coordinate_node`.
virtual texture_transform_node * | to_texture_transform () throw ()
| Cast to a `texture_transform_node`.
virtual time_dependent_node * | to_time_dependent () throw ()
| Cast to a `time_dependent_node`.
virtual transform_node * | to_transform () throw ()
| Cast to a `transform_node`.
virtual viewpoint_node * | to_viewpoint () throw ()
| Cast to a `viewpoint_node`.

## Private Attributes

boost::mutex | ref_count_mutex_
| Mutex to guard `ref_count_`.
size_t | ref_count_
| The number of owning references to the instance.
const node_type & | type_
| The type information object for the `node`.
const boost::shared_ptr < openvrml::scope > | scope_
| The `scope` to which the `node` belongs.
boost::shared_mutex | scene_mutex_
| Mutex protecting `scene_`.
openvrml::scene * | scene_
| The scene with which the `node` is associated.
boost::shared_mutex | modified_mutex_
| Mutex protecting `modified_`.
bool | modified_
| Indicate whether the `node` has been modified.

## Friends

class | local::proto_node
class | local::externproto_node
class | field_value_listener< sfbool >
| `sfbool` `field_value_listener`.
class | field_value_listener< sfcolor >
| `sfcolor` `field_value_listener`.
class | field_value_listener< sfcolorrgba >
| `sfcolorrgba` `field_value_listener`.
class | field_value_listener< sffloat >
| `sffloat` `field_value_listener`.
class | field_value_listener< sfdouble >
| `sfdouble` `field_value_listener`.
class | field_value_listener< sfimage >
| `sfimage` `field_value_listener`.
class | field_value_listener< sfint32 >
| `sfint32` `field_value_listener`.
class | field_value_listener< sfnode >
| `sfnode` `field_value_listener`.
class | field_value_listener< sfrotation >
| `sfrotation` `field_value_listener`.
class | field_value_listener< sfstring >
| `sfstring` `field_value_listener`.
class | field_value_listener< sftime >
| `sftime` `field_value_listener`.
class | field_value_listener< sfvec2f >
| `sfvec2f` `field_value_listener`.
class | field_value_listener< sfvec2d >
| `sfvec2d` `field_value_listener`.
class | field_value_listener< sfvec3f >
| `sfvec3f` `field_value_listener`.
class | field_value_listener< sfvec3d >
| `sfvec3d` `field_value_listener`.
class | field_value_listener< mfbool >
| `mfbool` `field_value_listener`.
class | field_value_listener< mfcolor >
| `mfcolor` `field_value_listener`.
class | field_value_listener< mfcolorrgba >
| `mfcolorrgba` `field_value_listener`.
class | field_value_listener< mffloat >
| `mffloat` `field_value_listener`.
class | field_value_listener< mfdouble >
| `mfdouble` `field_value_listener`.
class | field_value_listener< mfimage >
| `mfimage` `field_value_listener`.
class | field_value_listener< mfint32 >
| `mfint32` `field_value_listener`.
class | field_value_listener< mfnode >
| `mfnode` `field_value_listener`.
class | field_value_listener< mfrotation >
| `mfrotation` `field_value_listener`.
class | field_value_listener< mfstring >
| `mfstring` `field_value_listener`.
class | field_value_listener< mftime >
| `mftime` `field_value_listener`.
class | field_value_listener< mfvec2f >
| `mfvec2f` `field_value_listener`.
class | field_value_listener< mfvec2d >
| `mfvec2d` `field_value_listener`.
class | field_value_listener< mfvec3f >
| `mfvec3f` `field_value_listener`.
class | field_value_listener< mfvec3d >
| `mfvec3d` `field_value_listener`.
class | exposedfield< sfbool >
| `sfbool` `exposedfield`.
class | exposedfield< sfcolor >
| `sfcolor` `exposedfield`.
class | exposedfield< sfcolorrgba >
| `sfcolorrgba` `exposedfield`.
class | exposedfield< sffloat >
| `sffloat` `exposedfield`.
class | exposedfield< sfdouble >
| `sfdouble` `exposedfield`.
class | exposedfield< sfimage >
| `sfimage` `exposedfield`.
class | exposedfield< sfint32 >
| `sfint32` `exposedfield`.
class | exposedfield< sfnode >
| `sfnode` `exposedfield`.
class | exposedfield< sfrotation >
| `sfrotation` `exposedfield`.
class | exposedfield< sfstring >
| `sfstring` `exposedfield`.
class | exposedfield< sftime >
| `sftime` `exposedfield`.
class | exposedfield< sfvec2f >
| `sfvec2f` `exposedfield`.
class | exposedfield< sfvec2d >
| `sfvec2d` `exposedfield`.
class | exposedfield< sfvec3f >
| `sfvec3f` `exposedfield`.
class | exposedfield< sfvec3d >
| `sfvec3d` `exposedfield`.
class | exposedfield< mfbool >
| `mfbool` `exposedfield`.
class | exposedfield< mfcolor >
| `mfcolor` `exposedfield`.
class | exposedfield< mfcolorrgba >
| `mfcolorrgba` `exposedfield`.
class | exposedfield< mffloat >
| `mffloat` `exposedfield`.
class | exposedfield< mfdouble >
| `mfdouble` `exposedfield`.
class | exposedfield< mfimage >
| `mfimage` `exposedfield`.
class | exposedfield< mfint32 >
| `mfint32` `exposedfield`.
class | exposedfield< mfnode >
| `mfnode` `exposedfield`.
class | exposedfield< mfrotation >
| `mfrotation` `exposedfield`.
class | exposedfield< mfstring >
| `mfstring` `exposedfield`.
class | exposedfield< mftime >
| `mftime` `exposedfield`.
class | exposedfield< mfvec2f >
| `mfvec2f` `exposedfield`.
class | exposedfield< mfvec2d >
| `mfvec2d` `exposedfield`.
class | exposedfield< mfvec3f >
| `mfvec3f` `exposedfield`.
class | exposedfield< mfvec3d >
| `mfvec3d` `exposedfield`.
std::ostream & | operator<< (std::ostream &out, const node &n)
| Stream output.
script_node * | node_cast (node *n) throw ()
| Cast to a `script_node`.
appearance_node * | node_cast (node *n) throw ()
background_node * | node_cast (node *n) throw ()
bounded_volume_node * | node_cast (node *n) throw ()
child_node * | node_cast (node *n) throw ()
color_node * | node_cast (node *n) throw ()
color_rgba_node * | node_cast (node *n) throw ()
coordinate_node * | node_cast (node *n) throw ()
font_style_node * | node_cast (node *n) throw ()
geometry_node * | node_cast (node *n) throw ()
grouping_node * | node_cast (node *n) throw ()
light_node * | node_cast (node *n) throw ()
material_node * | node_cast (node *n) throw ()
navigation_info_node * | node_cast (node *n) throw ()
normal_node * | node_cast (node *n) throw ()
pointing_device_sensor_node * | node_cast (node *n) throw ()
scoped_light_node * | node_cast (node *n) throw ()
sound_source_node * | node_cast (node *n) throw ()
texture_node * | node_cast (node *n) throw ()
texture_coordinate_node * | node_cast (node *n) throw ()
texture_transform_node * | node_cast (node *n) throw ()
time_dependent_node * | node_cast (node *n) throw ()
transform_node * | node_cast (node *n) throw ()
viewpoint_node * | node_cast (node *n) throw ()

## Related Functions

(Note that these are not member functions.)
To * | node_cast (node *n)
| Downcast a `node` to one of the abstract `node` types.
void | intrusive_ptr_add_ref (const node *n)
| Increment the reference count.
void | intrusive_ptr_release (const node *n)
| Decrement the reference count.
bool | is_proto_instance (const node &n)
| Check whether a `node` is a `PROTO` instance.

## Detailed Description

A `node` in the scene graph.

## Constructor & Destructor Documentation

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

Destructor.

Remove `node` name (if any) from the `scope`.

openvrml::node::node | ( | const node_type & | type,
|  | const boost::shared_ptr< openvrml::scope > & | scope |
| ) |  |  | throw ()`[protected]`

Construct.

Parameters:

  `[in]` | type | the `node_type` associated with the instance.
  `[in]` | scope | the `scope` associated with the instance.

## Member Function Documentation

void openvrml::node::add_ref | ( |  | ) | const throw ()

Increment the reference count.

Add an owning reference.

void openvrml::node::remove_ref | ( |  | ) | const throw ()`[inline]`

Decrement the reference count.

Remove an owning reference; but do not destroy the instance if the reference count drops to zero. This function should be used with caution. It is really only appropriate when the caller is aware that the reference count may drop to zero but destroying the instance in that case would be inappropriate. In most cases it is appropriate to use `release`.

void openvrml::node::release | ( |  | ) | const throw ()

Decrement the reference count; destroy the instance if the count drops to zero.

size_t openvrml::node::use_count | ( |  | ) | const throw ()

The number of owning references to the instance.

Returns:
  the number of owning references to the instance.

const openvrml::node_type & openvrml::node::type | ( |  | ) | const throw ()

The type information object for the `node`.

Returns:
  the type information object for the `node`.

Reimplemented in openvrml::navigation_info_node.

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

Retrieve the name of this `node`.

Returns:
  the `node` name.

void openvrml::node::id | ( | const std::string & | node_id | ) | throw ( std::bad_alloc )

Set the name of the `node`.

Parameters:

  `[in]` | node_id | the name for the `node`.

Exceptions:

  | std::bad_alloc | if memory allocation fails.

const scope & openvrml::node::scope | ( |  | ) | const throw ()`[inline]`

Get the `scope` to which the `node` belongs.

Returns:
  the `scope` to which the `node` belongs.

See also:
  http://boost.org/libs/smart_ptr/shared_ptr.htm

openvrml::scene * openvrml::node::scene | ( |  | ) | const throw ()

Get the `scene` with which the `node` is associated.

Returns:
  the `scene` with which the `node` is associated.

const std::vector< boost::intrusive_ptr< openvrml::node > > & openvrml::node::impl_nodes | ( |  | ) | const throw ()

Get the implementation nodes of a `PROTO` instance.

If the `node` is not a `PROTO` instance, the returned `vector` is empty.

This function delegates to `do_impl_nodes`.

Returns:
  the implementation nodes.

std::ostream & openvrml::node::print | ( | std::ostream & | out,
|  | size_t | indent |
| ) |  |  | const

Pretty print.

Parameters:

  `[in,out]` | out | output stream.
  `[in]` | indent | number of spaces per indentation level.

Returns:
  `out`.

void openvrml::node::initialize | ( | openvrml::scene & | scene,
|  | double | timestamp |
| ) |  |  | throw ( std::bad_alloc )

Initialize the node.

This method works recursively, initializing any child nodes to the same `scene` and `timestamp`. If the node has already been initialized, this method has no effect.

Parameters:

  `[in,out]` | scene | the `scene` to which the `node` will belong.
  `[in]` | timestamp | the current time.

Exceptions:

  | std::bad_alloc | if memory allocation fails.

Postcondition:
  scene_ points to `scene`.

const FieldValue openvrml::node::field | ( | const std::string & | id | ) | const throw ( unsupported_interface , std::bad_alloc )`[inline]`

Generalized field accessor.

Parameters:

  `[in]` | id | the name of the field.

Returns:
  the field value.

Exceptions:

  | unsupported_interface | if the node has no field named `id`.
  | std::bad_alloc | if memory allocation fails.

Template Parameters:

  | FieldValue | a Field Value.

Parameters:

  `[in]` | id | the name of the `field`.

Returns:
  the field value.

Exceptions:

  | unsupported_interface | if the node has no field named `id`.
  | std::bad_cast | if the node's `id` field is not a `FieldValue`.

field_value_listener< FieldValue > & openvrml::node::event_listener | ( | const std::string & | id | ) | throw ( unsupported_interface )`[inline]`

Get an event listener.

Parameters:

  `[in]` | id | an `eventIn` identifier.

Exceptions:

  | unsupported_interface | if the `node` has no `eventIn` `id`.

Template Parameters:

  | FieldValue | a Field Value.

Parameters:

  `[in]` | id | an `eventIn` identifier.

Exceptions:

  | unsupported_interface | if the `node` has no `eventIn` `id`.
  | std::bad_cast | if the `node`'s `id` `eventIn` is not a `FieldValue`.

field_value_emitter< FieldValue > & openvrml::node::event_emitter | ( | const std::string & | id | ) | throw ( unsupported_interface )`[inline]`

Get an event emitter.

Parameters:

  `[in]` | id | an `eventOut` identifier.

Exceptions:

  | unsupported_interface | if the node has no eventOut `id`.

Template Parameters:

  | FieldValue | a Field Value.

Parameters:

  `[in]` | id | an `eventOut` identifier.

Exceptions:

  | unsupported_interface | if the `node` has no `eventOut` `id`.
  | std::bad_cast | if the `node`'s `id` `eventOut` is not a `FieldValue`.

void openvrml::node::shutdown | ( | double | timestamp | ) | throw ()

Shut down the node.

This method works recursively, shutting down any child `nodes`. If the `node` has already been shut down, this method has no effect.

Parameters:

  `[in]` | timestamp | the current time.

Postcondition:
  scene is 0.

bool openvrml::node::modified | ( |  | ) | const throw ( boost::thread_resource_error )

Determine whether the `node` has been modified.

The default implementation returns whether this `node` has been modified. Subclasses that can have child `nodes` should override this method and return `true` if any of their children have been modified.

Returns:
  `true` if the `node` has been modified; `false` otherwise.

Exceptions:

  | boost::thread_resource_error | if `modified_mutex_` cannot be locked.

void openvrml::node::modified | ( | bool | value | ) | throw ( boost::thread_resource_error )

Set the modified flag.

Indicates the node needs to be revisited for rendering.

Parameters:

  `[in]` | value |

Exceptions:

  | boost::thread_resource_error | if `modified_mutex_` cannot be locked.

void openvrml::node::emit_event | ( | openvrml::event_emitter & | emitter,
|  | double | timestamp |
| ) |  |  | throw ( std::bad_alloc )`[static, protected]`

Emit an event.

Parameters:

  `[in,out]` | emitter | an `event_emitter`.
  `[in]` | timestamp | the current time.

Exceptions:

  | std::bad_alloc | if memory allocation fails.

boost::shared_mutex & openvrml::node::scene_mutex | ( |  | ) | `[protected]`

The `scene` mutex.

Returns:
  the `scene` mutex.

const std::vector< boost::intrusive_ptr< openvrml::node > > & openvrml::node::do_impl_nodes | ( |  | ) | const throw ()`[private, virtual]`

Get the implementation nodes of a `PROTO` instance.

This default implementation returns an empty `vector`.

Returns:
  an empty `vector`.

void openvrml::node::do_initialize | ( | double | timestamp | ) | throw ( std::bad_alloc )`[private, virtual]`

`node` subclass-specific initialization.

This method is called by `initialize`. Subclasses of node should override this method for any subclass-specific initialization.

The default implementation of this method does nothing.

Parameters:

  `[in]` | timestamp | the current time.

Exceptions:

  | std::bad_alloc | if memory allocation fails.

Reimplemented in openvrml::script_node.

const openvrml::field_value & openvrml::node::do_field | ( | const std::string & | id | ) | const throw ( unsupported_interface )`[private, pure virtual]`

Called by `node::field` to get a `field`.

Parameters:

  `[in]` | id | field identifier.

Returns:
  the field value.

Exceptions:

  | unsupported_interface | if the `node` has no `field` `id`.

Implemented in openvrml::node_impl_util::abstract_node< Derived >, and openvrml::script_node.

openvrml::event_listener & openvrml::node::do_event_listener | ( | const std::string & | id | ) | throw ( unsupported_interface )`[private, pure virtual]`

Get an event listener.

This method is called by `event_listener`. Subclasses must implement this method.

Parameters:

  `[in]` | id | `eventIn` identifier.

Returns:
  the event listener.

Exceptions:

  | unsupported_interface | if the node has no `eventIn` `id`.

Implemented in openvrml::node_impl_util::abstract_node< Derived >, and openvrml::script_node.

openvrml::event_emitter & openvrml::node::do_event_emitter | ( | const std::string & | id | ) | throw ( unsupported_interface )`[private, pure virtual]`

Get an event emitter.

This method is called by `event_emitter`. Subclasses must implement this method.

Parameters:

  `[in]` | id | `eventOut` identifier.

Returns:
  the event emitter.

Exceptions:

  | unsupported_interface | if the node has no `eventOut` `id`.

Implemented in openvrml::node_impl_util::abstract_node< Derived >, and openvrml::script_node.

void openvrml::node::do_shutdown | ( | double | timestamp | ) | throw ()`[private, virtual]`

Called by node::shutdown.

`node` subclass-specific shut down.

Parameters:

  `[in]` | timestamp | the current time.

This method is called by `shutdown`. Subclasses of node should override this method for any subclass-specific shut down. Note that this method cannot throw.

The default implementation of this method does nothing.

Parameters:

  `[in]` | timestamp | the current time.

Reimplemented in openvrml::script_node.

bool openvrml::node::do_modified | ( |  | ) | const throw ( boost::thread_resource_error )`[private, virtual]`

Determine whether the `node` has been modified.

The default implementation returns `false`. Subclasses that can have child `nodes` should override this method and return `true` if any of their children has been modified.

Returns:
  `false`.

Exceptions:

  | boost::thread_resource_error | if a mutex cannot be locked.

openvrml::script_node * openvrml::node::to_script | ( |  | ) | throw ()`[private, virtual]`

Cast to a `script_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::script_node.

openvrml::appearance_node * openvrml::node::to_appearance | ( |  | ) | throw ()`[private, virtual]`

Cast to an `appearance_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::appearance_node.

openvrml::background_node * openvrml::node::to_background | ( |  | ) | throw ()`[private, virtual]`

Cast to a `background_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::background_node.

openvrml::bounded_volume_node * openvrml::node::to_bounded_volume | ( |  | ) | throw ()`[private, virtual]`

Cast to a `bounded_volume_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::bounded_volume_node.

openvrml::child_node * openvrml::node::to_child | ( |  | ) | throw ()`[private, virtual]`

Cast to a `child_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::child_node.

openvrml::color_node * openvrml::node::to_color | ( |  | ) | throw ()`[private, virtual]`

Cast to a `color_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::color_node.

openvrml::color_rgba_node * openvrml::node::to_color_rgba | ( |  | ) | throw ()`[private, virtual]`

Cast to a `color_rgba_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::color_rgba_node.

openvrml::coordinate_node * openvrml::node::to_coordinate | ( |  | ) | throw ()`[private, virtual]`

Cast to a `coordinate_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::coordinate_node.

openvrml::font_style_node * openvrml::node::to_font_style | ( |  | ) | throw ()`[private, virtual]`

Cast to a font_style_node.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::font_style_node.

openvrml::geometry_node * openvrml::node::to_geometry | ( |  | ) | throw ()`[private, virtual]`

Cast to a geometry_node.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::geometry_node.

openvrml::grouping_node * openvrml::node::to_grouping | ( |  | ) | throw ()`[private, virtual]`

Cast to a `grouping_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::grouping_node.

openvrml::light_node * openvrml::node::to_light | ( |  | ) | throw ()`[private, virtual]`

Cast to a `light_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::light_node.

openvrml::material_node * openvrml::node::to_material | ( |  | ) | throw ()`[private, virtual]`

Cast to a `material_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::material_node.

openvrml::navigation_info_node * openvrml::node::to_navigation_info | ( |  | ) | throw ()`[private, virtual]`

Cast to a `navigation_info_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0.

Reimplemented in openvrml::navigation_info_node.

openvrml::normal_node * openvrml::node::to_normal | ( |  | ) | throw ()`[private, virtual]`

Cast to a `normal_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::normal_node.

openvrml::pointing_device_sensor_node * openvrml::node::to_pointing_device_sensor | ( |  | ) | throw ()`[private, virtual]`

Cast to a `pointing_device_sensor_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::pointing_device_sensor_node.

openvrml::scoped_light_node * openvrml::node::to_scoped_light | ( |  | ) | throw ()`[private, virtual]`

Cast to a `scoped_light_node`.

For internal use only.

Returns:
  0.

Reimplemented in openvrml::scoped_light_node.

openvrml::sound_source_node * openvrml::node::to_sound_source | ( |  | ) | throw ()`[private, virtual]`

Cast to a `sound_source_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::sound_source_node.

openvrml::texture_node * openvrml::node::to_texture | ( |  | ) | throw ()`[private, virtual]`

Cast to a `texture_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::texture_node.

openvrml::texture_coordinate_node * openvrml::node::to_texture_coordinate | ( |  | ) | throw ()`[private, virtual]`

Cast to a `texture_coordinate_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::texture_coordinate_node.

openvrml::texture_transform_node * openvrml::node::to_texture_transform | ( |  | ) | throw ()`[private, virtual]`

Cast to a `texture_transform_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::texture_transform_node.

openvrml::time_dependent_node * openvrml::node::to_time_dependent | ( |  | ) | throw ()`[private, virtual]`

Cast to a `time_dependent_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::time_dependent_node.

openvrml::transform_node * openvrml::node::to_transform | ( |  | ) | throw ()`[private, virtual]`

Cast to a `transform_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::transform_node.

openvrml::viewpoint_node * openvrml::node::to_viewpoint | ( |  | ) | throw ()`[private, virtual]`

Cast to a `viewpoint_node`.

For internal use only.

Default implementation returns 0.

Returns:
  0

Reimplemented in openvrml::viewpoint_node.

## Friends And Related Function Documentation

class openvrml::node::field_value_listener`[friend]`

`sfbool` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfcolor` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfcolorrgba` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sffloat` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfdouble` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfimage` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfint32` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfnode` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfrotation` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfstring` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sftime` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfvec2f` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfvec2d` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfvec3f` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`sfvec3d` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfbool` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfcolor` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfcolorrgba` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mffloat` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfdouble` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfimage` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfint32` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfnode` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfrotation` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfstring` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mftime` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfvec2f` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfvec2d` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfvec3f` `field_value_listener`.

class openvrml::node::field_value_listener`[friend]`

`mfvec3d` `field_value_listener`.

class openvrml::node::exposedfield`[friend]`

`sfbool` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfcolor` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfcolorrgba` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sffloat` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfdouble` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfimage` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfint32` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfnode` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfrotation` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfstring` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sftime` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfvec2f` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfvec2d` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfvec3f` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`sfvec3d` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfbool` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfcolor` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfcolorrgba` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mffloat` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfdouble` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfimage` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfint32` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfnode` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfrotation` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfstring` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mftime` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfvec2f` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfvec2d` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfvec3f` `exposedfield`.

class openvrml::node::exposedfield`[friend]`

`mfvec3d` `exposedfield`.

std::ostream & openvrml::node::operator<< | ( | std::ostream & | out,
|  | const node & | n |
| ) |  |  | `[friend]`

Stream output.

openvrml::viewpoint_node * openvrml::node::node_cast< viewpoint_node * > | ( | node * | n | ) | throw ()`[friend]`

Cast to a `script_node`.

Cast to a `viewpoint_node`.

Cast to a `transform_node`.

Cast to a `texture_transform_node`.

Cast to a `texture_coordinate_node`.

Cast to a `texture_node`.

Cast to a `sound_source_node`.

Cast to a `normal_node`.

Cast to a `navigation_info_node`.

Cast to a `material_node`.

Cast to a `grouping_node`.

Cast to a `geometry_node`.

Cast to a `font_style_node`.

Cast to a `coordinate_node`.

Cast to a `color_rgba_node`.

Cast to a `color_node`.

Cast to a `child_node`.

Cast to a `appearance_node`.

To * node_cast | ( | node * | n | ) | `[related]`

Downcast a `node` to one of the abstract `node` types.

Template Parameters:

  | To | an abstract `node` type.

Parameters:

  `[in]` | n | a `node`.

Returns:
  a pointer to the downcast `node`, or 0 if the cast fails.

void intrusive_ptr_add_ref | ( | const node * | n | ) | `[related]`

Increment the reference count.

This function is used by `boost::intrusive_ptr<node>`.

See also:
  http://boost.org/libs/smart_ptr/intrusive_ptr.html

void intrusive_ptr_release | ( | const node * | n | ) | `[related]`

Decrement the reference count.

This function is used by `boost::intrusive_ptr<node>`.

See also:
  http://boost.org/libs/smart_ptr/intrusive_ptr.html

bool is_proto_instance | ( | const node & | n | ) | `[related]`

Check whether a `node` is a `PROTO` instance.

Parameters:

  `[in]` | n | a `node`.

Returns:
  `true` if `n` is a `PROTO` instance; `false` otherwise.

## Member Data Documentation

boost::mutex openvrml::node::ref_count_mutex_`[mutable, private]`

Mutex to guard `ref_count_`.

For internal use only.

size_t openvrml::node::ref_count_`[mutable, private]`

The number of owning references to the instance.

For internal use only.

const openvrml::node_type & openvrml::node::type_`[private]`

The type information object for the `node`.

For internal use only.

Reimplemented in openvrml::script_node.

boost::shared_ptr< openvrml::scope > openvrml::node::scope_`[private]`

The `scope` to which the `node` belongs.

For internal use only.

See also:
  http://boost.org/libs/smart_ptr/shared_ptr.htm

boost::shared_mutex openvrml::node::scene_mutex_`[mutable, private]`

Mutex protecting `scene_`.

For internal use only.

openvrml::scene * openvrml::node::scene_`[private]`

The scene with which the `node` is associated.

For internal use only.

boost::shared_mutex openvrml::node::modified_mutex_`[mutable, private]`

Mutex protecting `modified_`.

For internal use only.

bool openvrml::node::modified_`[private]`

Indicate whether the `node` has been modified.

For internal use only.

See also:
  modified

const boost::intrusive_ptr< openvrml::node > openvrml::node::self_tag`[static]`

Special value used when initializing a `script_node`.

One should never attempt to dereference this value. It is useful only for comparison.