48 class const_iterator:
public RefCountMField< Node >::const_iterator {
51 const_iterator( base_const_iterator i ):
66 class const_reverse_iterator:
71 const_reverse_iterator( base_const_reverse_iterator i ):
88 inline const_iterator
begin(
int id = 0 ) {
93 inline const_iterator
end(
int id = 0 ) {
98 inline const_reverse_iterator
rbegin(
int id = 0 ) {
103 inline const_reverse_iterator
rend(
int id = 0 ) {
156 Node *pn = getPrototypeNode( n );
164 virtual Node *preOnRemove( Node *n ) {
165 Node *pn = getPrototypeNode( n );
175 AUTOREF_DEBUG_NAME( value,
"MFNode::value" )
181 AUTOREF_DEBUG_NAME( value,
"MFNode::value" )
187 checkAccessTypeGet(
id );
195 return classTypeName();
204 virtual X3DTypes::X3DType
getX3DType() {
return X3DTypes::MFNODE; }
220 template<
class NodeType >
225 if( !
dynamic_cast< NodeType *
>( n ) ) {
226 Node *pi = getPrototypeNode( n );
227 if( !
dynamic_cast< NodeType *
>( pi ) ) {
229 s <<
"Expecting " <<
typeid( NodeType ).name();
264 template<
class Type >
269 if( !
dynamic_cast< Type *
>( n ) ) {
270 Node *pi = getPrototypeNode( n );
271 if( !
dynamic_cast< Type *
>( pi ) ) {
273 s <<
"Expecting " <<
typeid( Type ).name();
#define H3D_FULL_LOCATION
Contains different templates to modify field behaviour.
Contains the MFNodeAutoRefVector class.
Contains the RefCountMField class.
Header file for X3DPrototypeInstance, X3D scene-graph node.
std::string getTypeName() const
MFNode is almost like any MField but it encapsulates a vector of Node pointers.
Definition: MFNode.h:44
const_iterator end(int id=0)
Returns a const_iterator pointing to the end of the vector.
Definition: MFNode.h:93
virtual Node * front(int id=0)
Returns the first element.
Definition: MFNode.h:119
MFNode(size_type sz)
Creates an MFNode with space reserved for size nodes.
Definition: MFNode.h:179
const_reverse_iterator rbegin(int id=0)
Returns a const_reverse_iterator pointing to the beginning of the vector.
Definition: MFNode.h:98
static string classTypeName()
Returns a string name for this field type i.e. MFNode.
Definition: MFNode.h:199
virtual Node * getValueByIndex(size_type i, int id=0)
Get the value of the MField.
Definition: MFNode.h:141
virtual X3DTypes::X3DType getX3DType()
Returns the X3DType of the field.
Definition: MFNode.h:204
const_iterator begin(int id=0)
Returns a const_iterator pointing to the beginning of the vector.
Definition: MFNode.h:88
virtual Node * back(int id=0)
Returns the last element.
Definition: MFNode.h:130
MFNode()
Default constructor. Creates an empty MFNode.
Definition: MFNode.h:174
virtual const NodeVector & getValue(int id=0)
Get the value of the MField.
Definition: MFNode.h:185
virtual string getTypeName()
Returns a string name for this field type i.e. MFNode.
Definition: MFNode.h:194
const_reverse_iterator rend(int id=0)
Returns a const_reverse_iterator pointing to the end of the vector.
Definition: MFNode.h:103
virtual Node * operator[](size_type i)
Returns the n'th element.
Definition: MFNode.h:108
const_reference operator[](size_type n)
Returns the n'th element.
Definition: MField.h:211
static string classTypeName()
Returns a string name for this field type e.g. MFInt32.
Definition: MField.h:340
const_reference front(int id=0)
Returns the first element.
Definition: MField.h:219
VectorClass::const_iterator const_iterator
Const iterator used to iterate through a vector.
Definition: MField.h:122
VectorClass::const_reverse_iterator const_reverse_iterator
Const iterator used to iterate backwards through a vector.
Definition: MField.h:125
const_reference back(int id=0)
Returns the last element.
Definition: MField.h:227
VectorClass::size_type size_type
An unsigned integral type.
Definition: MField.h:118
Node is the base class for all classes that can be part of the H3D scene-graph.
Definition: Node.h:46
RefCountMField is almost like any MField but it encapsulates a vector of RefCoundtedClass pointers.
Definition: RefCountMField.h:50
virtual void onAdd(Node *n)
This function will be called when values of RefCountMField changes.
Definition: RefCountMField.h:222
virtual RefClass * getValueByIndex(typename BaseFieldType::size_type i, int id=0)
Get the value of the MField.
Definition: RefCountMField.h:91
Template to make sure that the Nodes that are set in a MFNode are of a specified type.
Definition: MFNode.h:265
virtual Type * getCastedValueByIndex(typename MFNode::size_type i, int id=0)
Get the value casted to the Type.
Definition: MFNode.h:284
void onAdd(Node *n)
We check that the type of the Node is of the correct type.
Definition: MFNode.h:268
Template to make sure that the Nodes that are added to a MFNode are of a specified Node type.
Definition: MFNode.h:221
virtual NodeType * getCastedValueByIndex(typename MFNode::size_type i, int id=0)
Get the value casted to the NodeType.
Definition: MFNode.h:246
virtual NodeType * getValueByIndex(typename MFNode::size_type i, int id=0)
Get the value casted to the NodeType.
Definition: MFNode.h:240
virtual void onAdd(Node *n)
We check that the type of the Node is of the correct type.
Definition: MFNode.h:224
This abstract node type is the base type for all prototype instances in the X3D system.
Definition: X3DPrototypeInstance.h:65
virtual Node * getPrototypedNode()
Get the node that is the internal scenegraph of the prototype.
Definition: X3DPrototypeInstance.h:81
DualQuaternion operator*(const DualQuaternion &q1, const DualQuaternion &q2)
H3D API namespace.
Definition: Anchor.h:38