Home | Download | Screen shots | Discussion | Documentation |
---|
#include <openvrml/node_impl_util.h>
Inherits std::stack< BindableNode * >.
The node at the top of the stack is considered the active node. Binding a node makes it the active node, moving it to the top of the stack if it already exists in the stack. Unbinding a node removes it from the stack, regardless of its position in the stack. See 4.6.10 of the VRML97 specification for further details of the semantics.
BindableNode | a Bindable Node. |
Public Member Functions | |
bool | bind (BindableNode &node, double timestamp) throw ( std::bad_alloc ) |
Bind a node. | |
bool | unbind (BindableNode &node, double timestamp) throw ( std::bad_alloc ) |
Unbind a node. | |
Private Types | |
typedef std::stack < BindableNode * > ::container_type | container_type |
The container type. |
std::stack< BindableNode * >::container_type openvrml::node_impl_util::bound_node_stack< BindableNode >::container_type [private] |
The container type.
For internal use only.
bool openvrml::node_impl_util::bound_node_stack< BindableNode >::bind | ( | BindableNode & | n, | |
double | timestamp | |||
) | throw ( std::bad_alloc ) [inline] |
Bind a node.
Call top()->bind(false)
. Push n
onto the top of the stack, making it the active node. Call n.bind(true)
.
top()
== &nBindableNode | a Bindable Node. |
[in,out] | n | the node to bind. |
[in] | timestamp | the current time. |
std::bad_alloc | if memory allocation fails. |
bool openvrml::node_impl_util::bound_node_stack< BindableNode >::unbind | ( | BindableNode & | n, | |
double | timestamp | |||
) | throw ( std::bad_alloc ) [inline] |
Unbind a node.
Call n.bind(false)
. Remove n
from the top of the stack. The next node on the stack becomes the active node. Call top()->bind(true)
.
&n
is not on the stack.BindableNode | a Bindable Node. |
[in,out] | n | the node to unbind. |
[in] | timestamp | the current time. |
std::bad_alloc | if memory allocation fails. |