#include <daeMetaChoice.h>
Public Member Functions | |
daeMetaChoice (daeMetaElement *container, daeMetaCMPolicy *parent=NULL, daeUInt choiceNum=0, daeUInt ordinal=0, daeInt minO=1, daeInt maxO=1) | |
daeMetaElement * | findChild (daeString elementName) |
void | getChildren (daeElement *parent, daeElementRefArray &array) |
daeElement * | placeElement (daeElement *parent, daeElement *child, daeUInt &ordinal, daeInt offset=0, daeElement *before=NULL, daeElement *after=NULL) |
daeBool | removeElement (daeElement *parent, daeElement *child) |
~daeMetaChoice () | |
Private Attributes | |
daeUInt | _choiceNum |
The daeMetaChoice class defines the behavior of an xs:choice content model in the COLLADA Schema.
Definition at line 17 of file daeMetaChoice.h.
daeMetaChoice::daeMetaChoice | ( | daeMetaElement * | container, | |
daeMetaCMPolicy * | parent = NULL , |
|||
daeUInt | choiceNum = 0 , |
|||
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. | |
choiceNum | An unsigned integer that represents which index in an element's CMData array coresponds to this choice's data. | |
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. |
daeMetaChoice::~daeMetaChoice | ( | ) |
daeMetaElement* daeMetaChoice::findChild | ( | daeString | elementName | ) | [virtual] |
Gets the daeMetaElement of an acceptable child of this content model object.
elementName | The name of the element whos metaElement information you are interested in. |
Implements daeMetaCMPolicy.
void daeMetaChoice::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. |
Implements daeMetaCMPolicy.
daeElement* daeMetaChoice::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. |
Implements daeMetaCMPolicy.
daeBool daeMetaChoice::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. |
Implements daeMetaCMPolicy.
daeUInt daeMetaChoice::_choiceNum [private] |
Definition at line 39 of file daeMetaChoice.h.