H3D API  2.4.1
Public Member Functions | List of all members
H3D::H3DDynamicFieldsObject Class Reference

This abstract interface class is the base class for all classes that specify arbitrary fields. More...

#include <H3D/H3DDynamicFieldsObject.h>

Inheritance diagram for H3D::H3DDynamicFieldsObject:
Inheritance graph

Public Member Functions

virtual bool addField (const string &name, const Field::AccessType &access, Field *field)
 Add a field to the Node. More...
 
virtual bool removeField (const string &_name)
 Remove a field from the Node. More...
 
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.
 
virtual void clearFields ()
 Remove all dynamic fields that have been previously added.
 
 H3DDynamicFieldsObject ()
 Constructor.
 

Detailed Description

This abstract interface class is the base class for all classes that specify arbitrary fields.

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

◆ addField()

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

Add a field to the Node.

Parameters
nameThe name of the field.
accessThe access type of the field.
fieldThe 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::X3DProgrammableShaderObject, H3D::ShaderProgram, H3D::Script, H3D::PackagedShader, H3D::ComposedShader, and H3D::ShaderConstants.

Referenced by H3D::Script::addField().

◆ removeField()

virtual bool H3D::H3DDynamicFieldsObject::removeField ( const string &  _name)
inlinevirtual

Remove a field from the Node.

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

Reimplemented in H3D::X3DProgrammableShaderObject, H3D::ComposedShader, and H3D::ShaderConstants.

Referenced by H3D::X3DProgrammableShaderObject::removeField(), and H3D::PyNode::removeField().


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