#include <daeMetaCMPolicy.h>
Public Member Functions | |
void | appendChild (daeMetaCMPolicy *p) |
virtual daeMetaElement * | findChild (daeString elementName)=0 |
virtual void | getChildren (daeElement *parent, daeElementRefArray &array)=0 |
daeMetaCMPolicy * | getParent () |
virtual daeElement * | placeElement (daeElement *parent, daeElement *child, daeUInt &ordinal, daeInt offset=0, daeElement *before=NULL, daeElement *after=NULL)=0 |
virtual daeBool | removeElement (daeElement *parent, daeElement *child)=0 |
void | setMaxOrdinal (daeUInt ord) |
virtual | ~daeMetaCMPolicy () |
Protected Member Functions | |
daeMetaCMPolicy (daeMetaElement *container, daeMetaCMPolicy *parent, daeUInt ordinal, daeInt minO, daeInt maxO) | |
Protected Attributes | |
daeTArray< daeMetaCMPolicy * > | _children |
daeMetaElement * | _container |
daeInt | _maxOccurs |
daeUInt | _maxOrdinal |
daeInt | _minOccurs |
daeUInt | _ordinalOffset |
daeMetaCMPolicy * | _parent |
The daeMetaCMPolicy class is the base class for the content model policy classes which are used to describe the availability and ordering of an element's children.
Definition at line 21 of file daeMetaCMPolicy.h.
daeMetaCMPolicy::daeMetaCMPolicy | ( | daeMetaElement * | container, | |
daeMetaCMPolicy * | parent, | |||
daeUInt | ordinal, | |||
daeInt | minO, | |||
daeInt | maxO | |||
) | [inline, protected] |
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. |
Definition at line 89 of file daeMetaCMPolicy.h.
virtual daeMetaCMPolicy::~daeMetaCMPolicy | ( | ) | [virtual] |
Destructor.
void daeMetaCMPolicy::appendChild | ( | daeMetaCMPolicy * | p | ) | [inline] |
Adds a child to this content model object.
p | The child content model policy object. |
Definition at line 64 of file daeMetaCMPolicy.h.
virtual daeMetaElement* daeMetaCMPolicy::findChild | ( | daeString | elementName | ) | [pure 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. |
Implemented in daeMetaAny, daeMetaChoice, daeMetaElementAttribute, daeMetaGroup, and daeMetaSequence.
virtual void daeMetaCMPolicy::getChildren | ( | daeElement * | parent, | |
daeElementRefArray & | array | |||
) | [pure 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. |
Implemented in daeMetaAny, daeMetaChoice, daeMetaElementAttribute, daeMetaElementArrayAttribute, daeMetaGroup, and daeMetaSequence.
daeMetaCMPolicy* daeMetaCMPolicy::getParent | ( | ) | [inline] |
Gets the parent of this content model policy object.
Definition at line 70 of file daeMetaCMPolicy.h.
virtual daeElement* daeMetaCMPolicy::placeElement | ( | daeElement * | parent, | |
daeElement * | child, | |||
daeUInt & | ordinal, | |||
daeInt | offset = 0 , |
|||
daeElement * | before = NULL , |
|||
daeElement * | after = NULL | |||
) | [pure 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. |
Implemented in daeMetaAny, daeMetaChoice, daeMetaElementAttribute, daeMetaElementArrayAttribute, daeMetaGroup, and daeMetaSequence.
virtual daeBool daeMetaCMPolicy::removeElement | ( | daeElement * | parent, | |
daeElement * | child | |||
) | [pure 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. |
Implemented in daeMetaAny, daeMetaChoice, daeMetaElementAttribute, daeMetaElementArrayAttribute, daeMetaGroup, and daeMetaSequence.
void daeMetaCMPolicy::setMaxOrdinal | ( | daeUInt | ord | ) | [inline] |
Sets the maximum ordinal value of this policy objects children. Used to keep proper ordering for cm objects that may appear multiple times.
ord | The maximum ordinal value for this content model object. |
Definition at line 77 of file daeMetaCMPolicy.h.
daeTArray<daeMetaCMPolicy*> daeMetaCMPolicy::_children [protected] |
Definition at line 102 of file daeMetaCMPolicy.h.
daeMetaElement* daeMetaCMPolicy::_container [protected] |
Definition at line 100 of file daeMetaCMPolicy.h.
daeInt daeMetaCMPolicy::_maxOccurs [protected] |
Maximum number of times this meta element can occur. -1 for unbounded
Definition at line 107 of file daeMetaCMPolicy.h.
daeUInt daeMetaCMPolicy::_maxOrdinal [protected] |
Definition at line 109 of file daeMetaCMPolicy.h.
daeInt daeMetaCMPolicy::_minOccurs [protected] |
Minimum number of times this meta element can occur.
Definition at line 105 of file daeMetaCMPolicy.h.
daeUInt daeMetaCMPolicy::_ordinalOffset [protected] |
Definition at line 110 of file daeMetaCMPolicy.h.
daeMetaCMPolicy* daeMetaCMPolicy::_parent [protected] |
Definition at line 101 of file daeMetaCMPolicy.h.