#include <Field.h>
Inheritance diagram for H3D::Field:

Public Types | |
| typedef vector< Field * > | FieldSet |
| typedef vector< Field * > | FieldVector |
| enum | AccessType { INITIALIZE_ONLY, OUTPUT_ONLY, INPUT_ONLY, INPUT_OUTPUT } |
| The different access types that a field can have. More... | |
Public Member Functions | |
| H3D_API_EXCEPTION (FieldAccessError) | |
| Exception thrown when performing actions that conflict with the field's access type. | |
| Field () | |
| Constructor. | |
| virtual | ~Field () |
| Destructor. | |
| virtual void | checkFieldType (Field *f, int index) |
| Check that a given input field is of the correct type. | |
| void | setName (string _name) |
| Sets local the name of the field. Will be used in error reporting. | |
| string | getName () |
| Gets the name of the field. | |
| string | getFullName () |
| Get the full name of the field including the name of the owner node if it exists (ownername.fieldname). | |
| virtual string | getTypeName () |
| Returns a string name for this field type. | |
| virtual X3DTypes::X3DType | getX3DType () |
| Returns the X3DType of the field. | |
| virtual void | route (Field *, int id=0) |
| Set up a route from this field to the field given as argument. | |
| virtual void | routeNoEvent (Field *, int id=0) |
| Set up a route from this field to the field given as argument. | |
| virtual void | unroute (Field *) |
| Remove the route from this field to the field given as argument. | |
| virtual Field * | replaceRoute (Field *f, unsigned int i, int id=0) |
| Replace the i:th route to f with a route from this field. | |
| virtual Field * | replaceRouteNoEvent (Field *f, unsigned int i, int id=0) |
| Replace the i:th route to f with a route from this field. | |
| template<class F> | |
| void | route (auto_ptr< F > &f, int id=0) |
| Set up a route from this field to the field residing in the auto_ptr given as argument. | |
| template<class F> | |
| void | routeNoEvent (auto_ptr< F > &f, int id=0) |
| Set up a route from this field to the field residing in the auto_ptr given as argument. | |
| template<class F> | |
| void | unroute (auto_ptr< F > &f) |
| Remove the route from this field to the field residing in the auto_ptr given as argument. | |
| void | unrouteAll () |
| Remove all the routes from this field. | |
| virtual void | upToDate () |
| Check that the field is up-to-date, if not update() is called to make it up-to-date. | |
| bool | isUpToDate () |
| Returns true if the field is up to date, i.e. | |
| virtual void | touch () |
| Generates an event from this field. | |
| Node * | getOwner () |
| Get the Node that contains this field. | |
| void | setOwner (Node *n) |
| Set the Node that contains this field. | |
| void | setAccessType (AccessType _access_type) |
| Set the access type of the field. | |
| AccessType | getAccessType () |
| Get the access type of the field. | |
| bool | routesTo (Field *f) |
| Returns true of this field is routed to the field given as argument. | |
| bool | hasRouteFrom (Field *f) |
| Returns true of the field given as argumet is routed to this field. | |
| const FieldVector & | getRoutesIn () |
| Get the Fields that are routed to this Field. | |
| const FieldSet & | getRoutesOut () |
| Get the Fields this Field is routed to. | |
| const Event & | getLatestEvent () |
| Get the latest event. | |
Static Public Member Functions | |
| static string | classTypeName () |
| Returns a string name for this field type. | |
Protected Member Functions | |
| virtual void | startEvent () |
| Start a new event from this field. | |
| virtual void | propagateEvent (Event e) |
| Propagates an event to all Fields we are routed to. | |
| virtual void | routeFrom (Field *, int id) |
| Set up a route to this field from the field given as argument. | |
| virtual void | unrouteFrom (Field *) |
| Remove the route to this field from the field given as argument. | |
| virtual Field * | replaceRouteFrom (Field *f, unsigned int i, int id) |
| Replace the i:th route to this field with the field given as argument. | |
| virtual void | update () |
| This function will be called to update the field if it has a pending event when the upToDate() function is called. | |
| void | checkAccessTypeRoute (Field *f, int id) |
| Check the access type is correct for performing a route from this field to f. | |
| void | checkAccessTypeRouteFrom (Field *f, int id) |
| Check the access type is correct for performing a route from f to this field. | |
| void | checkAccessTypeGet (int id) |
| Check the access type is valid for getting the value of a field. | |
| void | checkAccessTypeSet (int id) |
| Check the access type is valid for changing the value of a field. | |
| int | ownerId () |
| Gets the id of the owner node, -1 if no owner. | |
Protected Attributes | |
| string | name |
| The name of the field. | |
| bool | event_lock |
| If true, stops events from being propagated. | |
| bool | update_lock |
| If true, stops the update() function from being called in the upToDate() function. | |
| FieldSet | routes_out |
| The Fields that this field is routed to. | |
| FieldVector | routes_in |
| The Field that are routed to this field. | |
| Event | event |
| The last event that happened. | |
| Node * | owner |
| The node that contain this field. | |
| AccessType | access_type |
| The type of access to the field. | |
Classes | |
| struct | Event |
| The Event struct encapsulates an event in the field network. More... | |
|
|
The different access types that a field can have.
|
|
|
Check the access type is valid for getting the value of a field.
|
|
||||||||||||
|
Check the access type is correct for performing a route from this field to f.
|
|
||||||||||||
|
Check the access type is correct for performing a route from f to this field.
|
|
|
Check the access type is valid for changing the value of a field.
|
|
||||||||||||
|
|
Returns a string name for this field type. Must have a static version in order to give relevant error messages in TypedField. Reimplemented in H3D::MFNode, H3D::MFTime, H3D::RefCountMField< RefClass >, H3D::SFColorRGBA, H3D::SField< Type >, H3D::SFNode, H3D::SFTime, H3D::MFieldBase< string, vector< string >, ParsableMField >, H3D::MFieldBase< H3DInt32, vector< H3DInt32 >, ParsableMField >, H3D::MFieldBase< Vec2f, vector< Vec2f >, ParsableMField >, H3D::MFieldBase< Vec3f, vector< Vec3f >, ParsableMField >, H3D::MFieldBase< Vec4f, vector< Vec4f >, ParsableMField >, H3D::MFieldBase< Rotation, vector< Rotation >, ParsableMField >, H3D::MFieldBase< Vec2d, vector< Vec2d >, ParsableMField >, H3D::MFieldBase< Vec3d, vector< Vec3d >, ParsableMField >, H3D::MFieldBase< Vec4d, vector< Vec4d >, ParsableMField >, H3D::MFieldBase< RefClass *, FieldInternals::MFNodeAutoRefVector< RefClass >, Field >, H3D::MFieldBase< RGB, vector< RGB >, ParsableMField >, H3D::MFieldBase< Node *, FieldInternals::MFNodeAutoRefVector< Node >, Field >, H3D::MFieldBase< H3DFloat, vector< H3DFloat >, ParsableMField >, H3D::MFieldBase< Type, vector< Type >, ParsableMField >, H3D::MFieldBase< H3DDouble, vector< H3DDouble >, ParsableMField >, H3D::MFieldBase< Matrix4f, vector< Matrix4f >, ParsableMField >, H3D::MFieldBase< Matrix4d, vector< Matrix4d >, ParsableMField >, H3D::MFieldBase< Matrix3f, vector< Matrix3f >, ParsableMField >, H3D::MFieldBase< Matrix3d, vector< Matrix3d >, ParsableMField >, H3D::MFieldBase< bool, vector< bool >, ParsableMField >, H3D::MFieldBase< RGBA, vector< RGBA >, ParsableMField >, H3D::MFieldBase< Quaternion, vector< Quaternion >, ParsableMField >, H3D::RefCountMField< Node >, H3D::SField< RGB >, H3D::SField< RGBA >, H3D::SField< Matrix3d >, H3D::SField< Matrix4d >, H3D::SField< H3DFloat >, H3D::SField< string >, H3D::SField< Matrix3f >, H3D::SField< Matrix4f >, H3D::SField< Vec2f >, H3D::SField< Vec3f >, H3D::SField< bool >, H3D::SField< Vec2d >, H3D::SField< Vec4f >, H3D::SField< H3DDouble >, H3D::SField< Vec3d >, H3D::SField< Vec4d >, H3D::SField< Quaternion >, H3D::SField< H3DInt32 >, and H3D::SField< Rotation >. |
|
|
Returns true if the field is up to date, i.e. it has not pending events. |
|
|
Propagates an event to all Fields we are routed to. event.ptr && Reimplemented in H3D::AutoUpdate< SFString >, H3D::AutoUpdate< SFBool >, H3D::AutoUpdate< TypedField< SFTime, SFBool > >, H3D::AutoUpdate< SFRotation >, H3D::AutoUpdate< SFVec3f >, H3D::AutoUpdate< TypedField< SFInt32, SFBool > >, H3D::AutoUpdate< Field >, H3D::AutoUpdate< TypedField< SFBool, SFTime > >, and H3D::AutoUpdate< SFTime >. |
|
||||||||||||||||
|
Replace the i:th route to f with a route from this field. An event will be generated to that field. |
|
||||||||||||||||
|
Replace the i:th route to f with a route from this field. No event will be generated to that field. |
|
||||||||||||||||
|
Set up a route from this field to the field residing in the auto_ptr given as argument. An event will be generated to that field. |
|
||||||||||||
|
Set up a route from this field to the field given as argument. An event will be generated to that field. |
|
||||||||||||||||
|
Set up a route from this field to the field residing in the auto_ptr given as argument. No event will be generated to that field. |
|
||||||||||||
|
Set up a route from this field to the field given as argument. No event will be generated to that field. |
|
|
Start a new event from this field. Any pending events from incoming routes will be removed, so that the current value is the value of the field. |
|
|
If true, stops events from being propagated. This is used to prevent event propagation to go around in circles in an infinite loop. |
|
|
The node that contain this field. NULL if it is a stand alone field. |
1.4.5