H3D API
2.4.1
|
This field class checks whether the given node is of the right type (ContourPolyline2D or NurbsCurve2D). More...
#include <H3D/Contour2D.h>
Public Member Functions | |
virtual void | onAdd (Node *n) |
This function will be called when values of RefCountMField changes. More... | |
![]() | |
const_iterator | begin (int id=0) |
Returns a const_iterator pointing to the beginning of the vector. | |
const_iterator | end (int id=0) |
Returns a const_iterator pointing to the end of the vector. | |
const_reverse_iterator | rbegin (int id=0) |
Returns a const_reverse_iterator pointing to the beginning of the vector. | |
const_reverse_iterator | rend (int id=0) |
Returns a const_reverse_iterator pointing to the end of the vector. | |
virtual Node * | operator[] (size_type i) |
Returns the n'th element. | |
virtual Node * | front (int id=0) |
Returns the first element. | |
virtual Node * | back (int id=0) |
Returns the last element. | |
virtual Node * | getValueByIndex (size_type i, int id=0) |
Get the value of the MField. | |
MFNode () | |
Default constructor. Creates an empty MFNode. | |
MFNode (size_type sz) | |
Creates an MFNode with space reserved for size nodes. | |
virtual const NodeVector & | getValue (int id=0) |
Get the value of the MField. | |
virtual string | getTypeName () |
Returns a string name for this field type i.e. MFNode. | |
virtual X3DTypes::X3DType | getX3DType () |
Returns the X3DType of the field. | |
![]() | |
RefCountMField () | |
Default constructor. Creates an empty RefCountMField. | |
RefCountMField (typename FieldInternals::MFNodeAutoRefVector< Node >::size_type sz) | |
Creates an RefCountMField with space reserved for size nodes. | |
void | setValue (typename FieldInternals::MFNodeAutoRefVector< Node >::size_type i, const typename FieldInternals::MFNodeAutoRefVector< Node >::value_type &v, int id=0) |
Set the value of an element in the field. More... | |
virtual void | setValue (const AutoRefVector< Node > &v, int id=0) |
Set the value of the field. More... | |
virtual void | setValue (const vector< Node * > &v, int id=0) |
Set the value of the field. More... | |
virtual void | swap (vector< Node * > &v, int id=0) |
Swaps the contents of two vectors. More... | |
virtual void | erase (Node *a, int id=0) |
Erase the first element equal to a. More... | |
virtual void | erase (unsigned int pos, int id=0) |
Erase the element at the specified index. More... | |
virtual void | insert (unsigned int pos, Node *a, int id=0) |
Insert an element before the index given by pos. More... | |
![]() | |
const_iterator | begin (int id=0) |
Returns a const_iterator pointing to the beginning of the vector. | |
const_iterator | end (int id=0) |
Returns a const_iterator pointing to the end of the vector. | |
const_reverse_iterator | rbegin (int id=0) |
Returns a const_reverse_iterator pointing to the beginning of the reversed vector. More... | |
const_reverse_iterator | rend (int id=0) |
Returns a const_reverse_iterator pointing to the end of the reversed vector. More... | |
unsigned int | size () |
Returns the size of the vector. | |
size_type | max_size () |
Returns the largest possible size of the vector. | |
size_type | capacity () |
Number of elements for which memory has been allocated. More... | |
void | reserve (size_type s) |
A request for allocation of additional memory. More... | |
void | resize (size_type n, Node * t=Node *(), int id=0) |
Inserts or erases elements at the end such that the size becomes n. | |
bool | empty () |
true if the vector's size is 0. | |
const_reference | operator[] (size_type n) |
Returns the n'th element. | |
const_reference | front (int id=0) |
Returns the first element. | |
const_reference | back (int id=0) |
Returns the last element. | |
void | swap (FieldInternals::MFNodeAutoRefVector< Node > &x, int id=0) |
Swaps the contents of two vectors. | |
void | push_back (const Node * &x, int id=0) |
Inserts a new element at the end. | |
void | pop_back (int id=0) |
Removed the last element. | |
void | clear (int id=0) |
Erases all of the elements. | |
virtual int | setValueFromVoidPtr (const void *data, unsigned int nr_elements, unsigned int len, int id=0) |
Set the value of the field given a pointer to where the value of the field is. More... | |
virtual int | getValueAsVoidPtr (void *data, unsigned int &nr_elements, unsigned int len, int id=0) |
Get the value of the data copied into a memory buffer. More... | |
virtual unsigned int | valueTypeSize () |
Returns the size in bytes of the value type the mfield encapsulates. | |
MFieldBase () | |
Default constructor. Creates an empty MField. | |
MFieldBase (size_type sz) | |
Creates a MField with space reserved for n elements. | |
![]() | |
virtual | ~MFieldClass () |
Virtual destructor. | |
virtual int | setValueFromVoidPtr (void *data, unsigned int nr_elements, unsigned int size, int id=0) |
Additional Inherited Members | |
![]() | |
typedef FieldInternals::MFNodeAutoRefVector< Node > | vector_type |
The type of the value member. | |
typedef FieldInternals::MFNodeAutoRefVector< Node > | vector_return_type |
The return type of functions that return the value of the field. | |
typedef VectorClass::value_type | value_type |
The type of the values stored in the vector. | |
typedef VectorClass::pointer | pointer |
Pointer to Type. | |
typedef VectorClass::const_reference | const_reference |
Const reference to Type. | |
typedef VectorClass::size_type | size_type |
An unsigned integral type. | |
typedef VectorClass::difference_type | difference_type |
A signed integral type. | |
typedef VectorClass::const_iterator | const_iterator |
Const iterator used to iterate through a vector. | |
typedef VectorClass::const_reverse_iterator | const_reverse_iterator |
Const iterator used to iterate backwards through a vector. | |
![]() | |
static string | classTypeName () |
Returns a string name for this field type i.e. MFNode. | |
![]() | |
static string | classTypeName () |
Returns a string name for this field type i.e. SFNode. | |
![]() | |
static string | classTypeName () |
Returns a string name for this field type e.g. MFInt32. | |
![]() | |
virtual void | update () |
Make the field up to date given that an event has occured. | |
virtual void | onRemove (Node *n) |
This function will be called when values of RefCountMField changes. More... | |
![]() | |
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. More... | |
void | checkTemplateArguments () |
Function for checking that a field given TypedField type specification is valid. More... | |
![]() | |
FieldInternals::MFNodeAutoRefVector< Node > | value |
The encapsulated vector. | |
This field class checks whether the given node is of the right type (ContourPolyline2D or NurbsCurve2D).
If this is the case the node is added to the children field.
|
inlinevirtual |
This function will be called when values of RefCountMField changes.
As soon as a Node is added onAdd will be called on the added value.
n | The added value. |
Reimplemented from H3D::RefCountMField< Node >.
References H3D::Contour2D::children, H3DUtil::RefCountedClass::getTypeName(), H3D_FULL_LOCATION, and H3D::RefCountMField< Node >::onAdd().