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

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

#include <SFNode.h>

Inheritance diagram for H3D::TypedSFNodeObject< Type >:

Inheritance graph
List of all members.

Public Member Functions

virtual Type * getCastedValue (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::TypedSFNodeObject< Type >

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

This is the same as TypedSFNode 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 getValue() function to return the correct type. Hence the getCastedValue() 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.


Generated on Thu Aug 24 12:39:55 2006 for H3D API by  doxygen 1.4.5