openvrml::node Class Reference

A node in the scene graph. More...

#include <openvrml/node.h>

Inheritance diagram for openvrml::node:

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_typetype () 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::scopescope () const throw ()
 Get the scope to which the node belongs.
openvrml::scenescene () 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_valuefield (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_listenerevent_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_emitterevent_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_valuedo_field (const std::string &id) const =0 throw ( unsupported_interface )
 Called by node::field to get a field.
virtual openvrml::event_listenerdo_event_listener (const std::string &id)=0 throw ( unsupported_interface )
 Get an event listener.
virtual openvrml::event_emitterdo_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_nodeto_script () throw ()
 Cast to a script_node.
virtual appearance_nodeto_appearance () throw ()
 Cast to an appearance_node.
virtual background_nodeto_background () throw ()
 Cast to a background_node.
virtual bounded_volume_nodeto_bounded_volume () throw ()
 Cast to a bounded_volume_node.
virtual child_nodeto_child () throw ()
 Cast to a child_node.
virtual color_nodeto_color () throw ()
 Cast to a color_node.
virtual color_rgba_nodeto_color_rgba () throw ()
 Cast to a color_rgba_node.
virtual coordinate_nodeto_coordinate () throw ()
 Cast to a coordinate_node.
virtual font_style_nodeto_font_style () throw ()
 Cast to a font_style_node.
virtual geometry_nodeto_geometry () throw ()
 Cast to a geometry_node.
virtual grouping_nodeto_grouping () throw ()
 Cast to a grouping_node.
virtual light_nodeto_light () throw ()
 Cast to a light_node.
virtual material_nodeto_material () throw ()
 Cast to a material_node.
virtual navigation_info_nodeto_navigation_info () throw ()
 Cast to a navigation_info_node.
virtual normal_nodeto_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_nodeto_scoped_light () throw ()
 Cast to a scoped_light_node.
virtual sound_source_nodeto_sound_source () throw ()
 Cast to a sound_source_node.
virtual texture_nodeto_texture () throw ()
 Cast to a texture_node.
virtual texture_coordinate_nodeto_texture_coordinate () throw ()
 Cast to a texture_coordinate_node.
virtual texture_transform_nodeto_texture_transform () throw ()
 Cast to a texture_transform_node.
virtual time_dependent_nodeto_time_dependent () throw ()
 Cast to a time_dependent_node.
virtual transform_nodeto_transform () throw ()
 Cast to a transform_node.
virtual viewpoint_nodeto_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_typetype_
 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::scenescene_
 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_nodenode_cast (node *n) throw ()
 Downcast a node to one of the abstract node types.
appearance_nodenode_cast (node *n) throw ()
background_nodenode_cast (node *n) throw ()
bounded_volume_nodenode_cast (node *n) throw ()
child_nodenode_cast (node *n) throw ()
color_nodenode_cast (node *n) throw ()
color_rgba_nodenode_cast (node *n) throw ()
coordinate_nodenode_cast (node *n) throw ()
font_style_nodenode_cast (node *n) throw ()
geometry_nodenode_cast (node *n) throw ()
grouping_nodenode_cast (node *n) throw ()
light_nodenode_cast (node *n) throw ()
material_nodenode_cast (node *n) throw ()
navigation_info_nodenode_cast (node *n) throw ()
normal_nodenode_cast (node *n) throw ()
pointing_device_sensor_nodenode_cast (node *n) throw ()
scoped_light_nodenode_cast (node *n) throw ()
sound_source_nodenode_cast (node *n) throw ()
texture_nodenode_cast (node *n) throw ()
texture_coordinate_nodenode_cast (node *n) throw ()
texture_transform_nodenode_cast (node *n) throw ()
time_dependent_nodenode_cast (node *n) throw ()
transform_nodenode_cast (node *n) throw ()
viewpoint_nodenode_cast (node *n) throw ()

Related Functions

(Note that these are not member functions.)

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]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::field_value_listener [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

class openvrml::node::exposedfield [friend]

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]

Downcast a node to one of the abstract node types.

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.

Cast to a script_node.

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.

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.

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.