H3D::TypedField< BaseField, RequiredArgTypes, OptionalArgTypes > Class Template Reference
[Field template modifiers.]

A template modifier class for adding type checking on the routes to any Field class. More...

#include <TypedField.h>

List of all members.

Protected Member Functions

void checkFieldType (Field *f, int index)
 Function for checking that a field is of a correct type given type specification according to the TypedField template arguments.
void checkTemplateArguments ()
 Function for checking that a field given TypedField type specification is valid.


Detailed Description

template<class BaseField, class RequiredArgTypes, class OptionalArgTypes = void>
class H3D::TypedField< BaseField, RequiredArgTypes, OptionalArgTypes >

A template modifier class for adding type checking on the routes to any Field class.

Parameters:
BaseField The Field type base class.
RequiredArgTypes The types of the routes that are required to be there. If these routes are not present when the evaluate() function is called then an exception is thrown. The types can be specified with the Types and Any templates. The Types template specifies a list of types and the Any template defines the type to be any of the types given in it. void can be used to specify that there are no required routes.
OptionalArgTypes Types of optional routes. These do not have to be there in order for the field to be able to evaluate. In addition to the templates Any and Types used for RequiredArgTypes the template AnyNumber can be used to specify that any number of the route types specified in the template are valid. void can be used to specify that there are no required routes.
Examples:
TypedField< SFInt32, SFInt32 > defines an SFInt32 field that requires one and only one DFInt32 field routed to it.
TypedField< MFFloat, void, AnyNumber<SFFloat> > defines an MFFloat that can have any number of SFFloat fields routed to it.
TypedField< SFInt32, Types< SFFloat, SFFloat >, Any< SFInt32, MFInt32 >> defines a SFInt32 field that requires two SFFloat routes and can optionally have an extra SFInt32 or MFInt32 route.


Member Function Documentation

template<class BaseField, class RequiredArgTypes, class OptionalArgTypes = void>
void H3D::TypedField< BaseField, RequiredArgTypes, OptionalArgTypes >::checkFieldType Field f,
int  index
[inline, protected]
 

Function for checking that a field is of a correct type given type specification according to the TypedField template arguments.

Parameters:
f The field to check the type of
index The index of the field in the template type list.
Exceptions:
TypedFieldCheck::InvalidType 

Reimplemented in H3D::TypedField< H3D::SFMatrix4f, Types< SFVec3f, SFRotation, SFVec3f, SFRotation, SFVec3f > >, H3D::TypedField< H3D::SFMatrix4f, Types< SFVec3f, SFVec3f, SFVec3f > >, H3D::TypedField< SFDouble, void, AnyNumber< SFTime > >, H3D::TypedField< SFVec3f, Types< SFFloat, SFVec3f > >, H3D::TypedField< SFQuaternion, Types< SFVec3f, SFRotation > >, H3D::TypedField< MatrixTransform::SFMatrix4f, Types< SFVec3f, SFVec3f, SFBound, SFBool, SFBool > >, H3D::TypedField< MFVec3f, Types< SFFloat, MFFloat, MFVec3f > >, H3D::TypedField< MFVec2f, Types< SFFloat, MFFloat, MFVec2f > >, H3D::TypedField< AutoUpdate< SFBool >, Types< SFBool, SFBool, SFBool, SFBool, MFString, SFFloat > >, H3D::TypedField< SFRotation, Types< SFInt32, SFBool, SFVec2f, SFRotation > >, H3D::TypedField< SFVec3f, Types< SFMatrix3f, SFVec3f > >, H3D::TypedField< SFVec3f, SFBoxBound, SFMatrix4f >, H3D::TypedField< SFVec3f, Types< SFMatrix4f, SFVec3f > >, H3D::TypedField< SFInt32, SFBool >, H3D::TypedField< SFVec3f, Types< SFVec3f, SFFloat > >, H3D::TypedField< PeriodicUpdate< SFInt32 >, Types< SFInt32, SFString > >, H3D::TypedField< SFFloat, Types< SFFloat, MFFloat, MFFloat > >, H3D::TypedField< SFVec3f, Types< SFVec3f, SFVec3f, SFFloat > >, H3D::TypedField< SFRotation, Types< SFFloat, MFFloat, MFRotation > >, H3D::TypedField< SFRotation, Types< SFRotation, SFFloat > >, H3D::TypedField< H3D::SFVec3f, Types< SFTime > >, H3D::TypedField< H3D::SFMatrix4f, Types< SFRotation, SFVec3f > >, H3D::TypedField< X3DGroupingNode::SFBound, SFInt32, AnyNumber< X3DBoundedObject::SFBound > >, H3D::TypedField< SFString, MFString >, H3D::TypedField< SFVec2f, Types< SFFloat, MFFloat, MFVec2f > >, H3D::TypedField< SFVec3f, Types< SFFloat, MFFloat, MFVec3f > >, H3D::TypedField< ThreadSafeSField< SFBool >, Types< SFInt32 > >, H3D::TypedField< SFColor, Types< SFFloat, MFFloat, MFColor > >, H3D::TypedField< SFRotation, Types< SFRotation, SFRotation > >, H3D::TypedField< SFVec4d, Types< SFVec3f, SFVec3f > >, H3D::TypedField< SFTime, SFBool >, H3D::TypedField< MFDouble, void, AnyNumber< MFTime > >, H3D::TypedField< SFBool, SFTime >, and H3D::TypedField< MFVec3f, Types< MFVec2f, MFRotation, MFVec2f, MFVec3f > >.

template<class BaseField, class RequiredArgTypes, class OptionalArgTypes = void>
void H3D::TypedField< BaseField, RequiredArgTypes, OptionalArgTypes >::checkTemplateArguments  )  [inline, protected]
 

Function for checking that a field given TypedField type specification is valid.

Exceptions:
TypedFieldCheck::InvalidTemplateArguments 

Reimplemented in H3D::TypedField< H3D::SFMatrix4f, Types< SFVec3f, SFRotation, SFVec3f, SFRotation, SFVec3f > >, H3D::TypedField< H3D::SFMatrix4f, Types< SFVec3f, SFVec3f, SFVec3f > >, H3D::TypedField< SFDouble, void, AnyNumber< SFTime > >, H3D::TypedField< SFVec3f, Types< SFFloat, SFVec3f > >, H3D::TypedField< SFQuaternion, Types< SFVec3f, SFRotation > >, H3D::TypedField< MatrixTransform::SFMatrix4f, Types< SFVec3f, SFVec3f, SFBound, SFBool, SFBool > >, H3D::TypedField< MFVec3f, Types< SFFloat, MFFloat, MFVec3f > >, H3D::TypedField< MFVec2f, Types< SFFloat, MFFloat, MFVec2f > >, H3D::TypedField< AutoUpdate< SFBool >, Types< SFBool, SFBool, SFBool, SFBool, MFString, SFFloat > >, H3D::TypedField< SFRotation, Types< SFInt32, SFBool, SFVec2f, SFRotation > >, H3D::TypedField< SFVec3f, Types< SFMatrix3f, SFVec3f > >, H3D::TypedField< SFVec3f, SFBoxBound, SFMatrix4f >, H3D::TypedField< SFVec3f, Types< SFMatrix4f, SFVec3f > >, H3D::TypedField< SFInt32, SFBool >, H3D::TypedField< SFVec3f, Types< SFVec3f, SFFloat > >, H3D::TypedField< PeriodicUpdate< SFInt32 >, Types< SFInt32, SFString > >, H3D::TypedField< SFFloat, Types< SFFloat, MFFloat, MFFloat > >, H3D::TypedField< SFVec3f, Types< SFVec3f, SFVec3f, SFFloat > >, H3D::TypedField< SFRotation, Types< SFFloat, MFFloat, MFRotation > >, H3D::TypedField< SFRotation, Types< SFRotation, SFFloat > >, H3D::TypedField< H3D::SFVec3f, Types< SFTime > >, H3D::TypedField< H3D::SFMatrix4f, Types< SFRotation, SFVec3f > >, H3D::TypedField< X3DGroupingNode::SFBound, SFInt32, AnyNumber< X3DBoundedObject::SFBound > >, H3D::TypedField< SFString, MFString >, H3D::TypedField< SFVec2f, Types< SFFloat, MFFloat, MFVec2f > >, H3D::TypedField< SFVec3f, Types< SFFloat, MFFloat, MFVec3f > >, H3D::TypedField< ThreadSafeSField< SFBool >, Types< SFInt32 > >, H3D::TypedField< SFColor, Types< SFFloat, MFFloat, MFColor > >, H3D::TypedField< SFRotation, Types< SFRotation, SFRotation > >, H3D::TypedField< SFVec4d, Types< SFVec3f, SFVec3f > >, H3D::TypedField< SFTime, SFBool >, H3D::TypedField< MFDouble, void, AnyNumber< MFTime > >, H3D::TypedField< SFBool, SFTime >, and H3D::TypedField< MFVec3f, Types< MFVec2f, MFRotation, MFVec2f, MFVec3f > >.


Generated on Thu Aug 24 12:40:16 2006 for H3D API by  doxygen 1.4.5