H3D::H3DDynamicFieldsObject Class Reference
[Abstract interface classes.]

This abstract interface class is the base class for all node types that specify arbitrary fields i.e. More...

#include <H3D/H3DDynamicFieldsObject.h>

Inheritance diagram for H3D::H3DDynamicFieldsObject:

Inheritance graph

List of all members.

Public Member Functions

 H3DDynamicFieldsObject (H3DNodeDatabase *_database)
 Constructor.
virtual ~H3DDynamicFieldsObject ()
 Destructor. Virtual to make H3DDynamicFieldsObject a polymorphic type.
virtual bool addField (const string &name, const Field::AccessType &access, Field *field)
 Add a field to the Node.
field_iterator firstField ()
 Get an iterator to the first of the dynamic fields.
field_iterator endField ()
 Get an iterator pointing to the end of the dynamic fields.
void clearFields ()
 Remove all dynamic fields that have been previously added.

Protected Attributes

H3DNodeDatabasedatabase
 Remove a field from the Node.


Detailed Description

This abstract interface class is the base class for all node types that specify arbitrary fields i.e.

fields that can be defined e.g. from X3D as in a prototype declaration.


Member Function Documentation

virtual bool H3D::H3DDynamicFieldsObject::addField ( const string &  name,
const Field::AccessType access,
Field field 
) [inline, virtual]

Add a field to the Node.

Parameters:
name The name of the field.
access The access type of the field.
field The field to add to the node. The ownership of the Field pointer is handed over to the Node and will be destructed when the Node is destructed.
Returns:
true on success, false otherwise.

Reimplemented in H3D::ComposedShader, H3D::PackagedShader, and H3D::ShaderProgram.

References H3D::Node::getField(), H3D::Field::setName(), and H3D::Field::setOwner().

Referenced by H3D::PyNode::addField(), H3D::X3D::X3DSAX2Handlers::handleFieldElement(), and H3D::ProtoDeclaration::newProtoInstance().


Member Data Documentation

Remove a field from the Node.

Parameters:
name The name of the field to remove.
Returns:
true on success false otherwise.

Reimplemented in H3D::ComposedShader, H3D::PackagedShader, H3D::PrototypeInstance, H3D::Script, H3D::ShaderProgram, and H3D::X3DPrototypeInstance.


The documentation for this class was generated from the following file:

Generated on Fri Nov 7 10:30:12 2008 for H3D API by  doxygen 1.5.7