#include <daeMetaElementAttribute.h>
Public Member Functions | |
virtual void | copy (daeElement *toElement, daeElement *fromElement) |
daeMetaElementArrayAttribute (daeMetaElement *container, daeMetaCMPolicy *parent=NULL, daeUInt ordinal=0, daeInt minO=1, daeInt maxO=1) | |
virtual daeMemoryRef | get (daeElement *e, daeInt index) |
void | getChildren (daeElement *parent, daeElementRefArray &array) |
virtual daeInt | getCount (daeElement *e) |
virtual daeBool | isArrayAttribute () |
virtual daeElement * | placeElement (daeElement *parent, daeElement *child, daeUInt &ordinal, daeInt offset=0, daeElement *before=NULL, daeElement *after=NULL) |
virtual daeBool | removeElement (daeElement *parent, daeElement *child) |
void | setCollection (daeElement *parent, daeDocument *c) |
virtual void | setDocument (daeElement *parent, daeDocument *c) |
~daeMetaElementArrayAttribute () |
The daeMetaElementArrayAttribute
class is similar to daeMetaElementAttribute except that this meta attribute describes an array of elements rather than a singleton.
Definition at line 123 of file daeMetaElementAttribute.h.
daeMetaElementArrayAttribute::daeMetaElementArrayAttribute | ( | daeMetaElement * | container, | |
daeMetaCMPolicy * | parent = NULL , |
|||
daeUInt | ordinal = 0 , |
|||
daeInt | minO = 1 , |
|||
daeInt | maxO = 1 | |||
) |
Constructor.
container | The daeMetaElement that this policy object belongs to. | |
parent | The daeMetaCMPolicy parent of this policy object. | |
odinal | The ordinal value offset of this specific policy object. Used for maintaining the correct order of child elements. | |
minO | The minimum number of times this CMPolicy object must appear. This value comes from the COLLADA schema. | |
maxO | The maximum number of times this CMPolicy object may appear. This value comes from the COLLADA schema. |
daeMetaElementArrayAttribute::~daeMetaElementArrayAttribute | ( | ) |
virtual void daeMetaElementArrayAttribute::copy | ( | daeElement * | toElement, | |
daeElement * | fromElement | |||
) | [virtual] |
Defines the override version of this method from daeMetaElement
.
toElement | Pointer to a daeElement to copy this attribute to. | |
fromElement | Pointer to a daeElement to copy this attribute from. |
Reimplemented from daeMetaElementAttribute.
virtual daeMemoryRef daeMetaElementArrayAttribute::get | ( | daeElement * | e, | |
daeInt | index | |||
) | [virtual] |
Defines the override version of this method from daeMetaElement
.
e | Containing element from which to get the element. | |
index | Index of the particle to retrieve if indeed there is an array of elements rather than a singleton. |
Reimplemented from daeMetaElementAttribute.
void daeMetaElementArrayAttribute::getChildren | ( | daeElement * | parent, | |
daeElementRefArray & | array | |||
) | [virtual] |
Populates an array with the children of parent based on this content model object.
parent | The parent element whos children you want. | |
array | The array where you the children will be appended to. |
Reimplemented from daeMetaElementAttribute.
virtual daeInt daeMetaElementArrayAttribute::getCount | ( | daeElement * | e | ) | [virtual] |
Defines the override version of this method from daeMetaElement
.
e | Containing element to run the operation on. |
e.
Reimplemented from daeMetaElementAttribute.
virtual daeBool daeMetaElementArrayAttribute::isArrayAttribute | ( | ) | [inline, virtual] |
Gets if this attribute is an array attribute.
Reimplemented from daeMetaElementAttribute.
Definition at line 178 of file daeMetaElementAttribute.h.
virtual daeElement* daeMetaElementArrayAttribute::placeElement | ( | daeElement * | parent, | |
daeElement * | child, | |||
daeUInt & | ordinal, | |||
daeInt | offset = 0 , |
|||
daeElement * | before = NULL , |
|||
daeElement * | after = NULL | |||
) | [virtual] |
Places an element into the parent element based on this content model policy object.
parent | The parent element for which the child element will be placed. | |
child | The new child element. | |
ordinal | A reference to a daeUInt which holds the ordinal return value for a placed child. Used to maintain proper ording of child elements. | |
offset | The offset to used when attempting to place this element. Affects comparison against minOccurs and maxOccurs. | |
before | The element that the child should appear before. Optional. | |
after | The element that the child should appear after. Optional. |
Reimplemented from daeMetaElementAttribute.
virtual daeBool daeMetaElementArrayAttribute::removeElement | ( | daeElement * | parent, | |
daeElement * | child | |||
) | [virtual] |
Removes an element from the parent based on this content model object.
parent | The parent element for which child you want to remove. | |
child | The child that will be removed from the parent. |
Reimplemented from daeMetaElementAttribute.
void daeMetaElementArrayAttribute::setCollection | ( | daeElement * | parent, | |
daeDocument * | c | |||
) | [inline] |
Reimplemented from daeMetaElementAttribute.
Definition at line 148 of file daeMetaElementAttribute.h.
virtual void daeMetaElementArrayAttribute::setDocument | ( | daeElement * | parent, | |
daeDocument * | c | |||
) | [virtual] |
Sets the database document associated with this element.
c | The daeDocument to associate with this element. |
Reimplemented from daeMetaElementAttribute.