29 #ifndef __X3DBINDABLENODE_H__
30 #define __X3DBINDABLENODE_H__
110 typedef std::deque< X3DBindableNode* > StackType;
111 typedef map< string, StackType> StackMapType;
125 inline virtual void setValue(
const bool &v,
int _id = 0 ) {
137 Inst< SFSetBind > _set_bind = 0,
138 Inst< SFNode > _metadata = 0,
139 Inst< SFTime > _bindTime = 0,
140 Inst< SFBool > _isBound = 0 );
150 if ( !stack[bindable_stack_name].empty() )
151 return stack[bindable_stack_name].front();
157 static const StackType &getStack(
const string &bindable_stack_name );
160 static const StackMapType &getStackMap();
163 virtual void initialize();
166 virtual void toStackTop();
169 virtual void removeFromStack();
173 const StackType &s = getStack( bindable_stack_name );
174 if( s.size() > 0 )
return this == s.front();
199 string bindable_stack_name;
Contains the SFBool field class.
Contains the SFTime field class.
Header file for X3DChildNode, X3D scene-graph node.
virtual void setValue(const bool &v, int id=0)
Set the value of the field.
Definition: SField.h:215
virtual void update()
Make the field up to date given that an event has occured.
Definition: SField.h:181
X3DBindableNode is the abstract base type for all bindable children nodes, including Background,...
Definition: X3DBindableNode.h:108
H3DUniquePtr< SFSetBind > set_bind
Input field to bind or unbind the node.
Definition: X3DBindableNode.h:182
static X3DBindableNode * getActive(const string &bindable_stack_name)
Returns the active bindable instance, i.e.
Definition: X3DBindableNode.h:149
bool isStackTop()
Is this node at the top of the stack.
Definition: X3DBindableNode.h:172
static StackMapType stack
The bindable stack.
Definition: X3DBindableNode.h:201
static H3DNodeDatabase database
The H3DNodedatabase for this node.
Definition: X3DBindableNode.h:196
virtual ~X3DBindableNode()
Destructor.
Definition: X3DBindableNode.h:143
H3DUniquePtr< SFTime > bindTime
The bindTime field is the time at which the Viewpoint node is bound or unbound.
Definition: X3DBindableNode.h:188
H3DUniquePtr< SFBool > isBound
Output field telling if this node is bound or not.
Definition: X3DBindableNode.h:193
This abstract node type indicates that the concrete nodes which are instantiated based on it may be u...
Definition: X3DChildNode.h:42
H3D API namespace.
Definition: Anchor.h:38
The AutoUpdate field is a template to force the BaseField to update itself as soon as an event is rec...
Definition: FieldTemplates.h:130
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194
The SFSetBind field calls toStackTop() and removeFromStack() on the X3DBindableNode it is in dependin...
Definition: X3DBindableNode.h:115
virtual void update()
Make the field up to date given that an event has occured.
Definition: X3DBindableNode.h:116
virtual void setValue(const bool &v, int _id=0)
Set the value of the field.
Definition: X3DBindableNode.h:125