H3D::TypedMFNodeObject< Type > Class Template Reference
[Field template modifiers.]

Template to make sure that the Nodes that is set in a SFNode is of a specified type. More...

#include <H3D/MFNode.h>

Inheritance diagram for H3D::TypedMFNodeObject< Type >:

Inheritance graph

List of all members.

Public Member Functions

virtual Type * getCastedValueByIndex (typename MFNode::size_type i, int id=0)
 Get the value casted to the Type.

Protected Member Functions

void onAdd (Node *n)
 We check that the type of the Node is of the correct type.


Detailed Description

template<class Type>
class H3D::TypedMFNodeObject< Type >

Template to make sure that the Nodes that is set in a SFNode is of a specified type.

This is the same as TypedMFNode but with the difference that the type does not have to be a node type but can be an abstract base class such as X3DMetadataObject. This makes it impossible however to override the getValueByIndex() function to return the correct type. Hence the getCastedValueByIndex() function must be used. You only have to use this template if you want to use one of the interface base classes such as X3DMetadataObject and H3DDisplayListObject as the Type parameter. In all other cases the TypedSFNode template is recommended.

Parameters:
Type The expected type.

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

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