#include <daeMetaElementAttribute.h>
The daeMetaElementAttribute
class represents a content model object that is an element.
Definition at line 23 of file daeMetaElementAttribute.h.
daeMetaElementAttribute::daeMetaElementAttribute | ( | 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. |
virtual daeMetaElementAttribute::~daeMetaElementAttribute | ( | ) | [virtual] |
Destructor
virtual void daeMetaElementAttribute::copy | ( | daeElement * | toElement, | |
daeElement * | fromElement | |||
) | [virtual] |
Defines the override version of base method.
toElement | Pointer to a daeElement to copy this attribute to. | |
fromElement | Pointer to a daeElement to copy this attribute from. |
Reimplemented from daeMetaAttribute.
Reimplemented in daeMetaElementArrayAttribute.
daeMetaElement* daeMetaElementAttribute::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.
virtual daeMemoryRef daeMetaElementAttribute::get | ( | daeElement * | e, | |
daeInt | index | |||
) | [virtual] |
Gets an element from containing element e
based on index.
e | Containing element from which to get the element. | |
index | Index of the element to retrieve if indeed there is an array of elements rather than a singleton. |
Reimplemented in daeMetaElementArrayAttribute.
virtual void daeMetaElementAttribute::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.
Reimplemented in daeMetaElementArrayAttribute.
virtual daeInt daeMetaElementAttribute::getCount | ( | daeElement * | e | ) | [virtual] |
Gets the number of elements associated with this attribute in instance e.
e | Containing element to run the operation on. |
e.
Reimplemented in daeMetaElementArrayAttribute.
daeMetaElement* daeMetaElementAttribute::getElementType | ( | ) | [inline] |
Gets the element type for the element that this attribute points to.
daeMetaElement
representing the type. Definition at line 66 of file daeMetaElementAttribute.h.
virtual daeBool daeMetaElementAttribute::isArrayAttribute | ( | ) | [inline, virtual] |
Gets if this attribute is an array attribute.
Reimplemented from daeMetaAttribute.
Reimplemented in daeMetaElementArrayAttribute.
Definition at line 113 of file daeMetaElementAttribute.h.
virtual daeElement* daeMetaElementAttribute::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.
Reimplemented in daeMetaElementArrayAttribute.
virtual daeBool daeMetaElementAttribute::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.
Reimplemented in daeMetaElementArrayAttribute.
virtual void daeMetaElementAttribute::set | ( | daeElement * | element, | |
daeString | s | |||
) | [virtual] |
Defines the override version of base method.
element | Element on which to set this attribute. | |
s | String containing the value to be converted via the atomic type system. |
Reimplemented from daeMetaAttribute.
void daeMetaElementAttribute::setCollection | ( | daeElement * | parent, | |
daeDocument * | c | |||
) | [inline] |
Reimplemented in daeMetaElementArrayAttribute.
Definition at line 74 of file daeMetaElementAttribute.h.
virtual void daeMetaElementAttribute::setDocument | ( | daeElement * | parent, | |
daeDocument * | c | |||
) | [virtual] |
Sets the database document associated with this element.
parent | The daeElement to set the document. | |
c | The daeDocument to associate with this element. |
Reimplemented from daeMetaAttribute.
Reimplemented in daeMetaElementArrayAttribute.
void daeMetaElementAttribute::setElementType | ( | daeMetaElement * | elementType | ) | [inline] |
Sets the element type for the element that this attribute points to.
elementType | daeMetaElement representing the type. |
Definition at line 59 of file daeMetaElementAttribute.h.
The metaElement that describes the element type of this attribute
Definition at line 27 of file daeMetaElementAttribute.h.