daeMetaCMPolicy Class Reference

#include <daeMetaCMPolicy.h>

Inheritance diagram for daeMetaCMPolicy:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void appendChild (daeMetaCMPolicy *p)
virtual daeMetaElementfindChild (daeString elementName)=0
virtual void getChildren (daeElement *parent, daeElementRefArray &array)=0
daeMetaCMPolicygetParent ()
virtual daeElementplaceElement (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

Detailed Description

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.


Constructor & Destructor Documentation

daeMetaCMPolicy::daeMetaCMPolicy ( daeMetaElement container,
daeMetaCMPolicy parent,
daeUInt  ordinal,
daeInt  minO,
daeInt  maxO 
) [inline, protected]

Constructor.

Parameters:
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.


Member Function Documentation

void daeMetaCMPolicy::appendChild ( daeMetaCMPolicy p  )  [inline]

Adds a child to this content model object.

Parameters:
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.

Parameters:
elementName The name of the element whos metaElement information you are interested in.
Returns:
Returns a pointer to a daeMetaElement class that describes the element interested in. Returns NULL if the element is not valid in this content model.

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.

Parameters:
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.

Returns:
Returns a pointer to the parent node.

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.

Parameters:
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.
Returns:
Returns The child element that was placed within this content model object or any of its children. NULL if placement failed.

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.

Parameters:
parent The parent element for which child you want to remove.
child The child that will be removed from the parent.
Returns:
Returns true if the child was successfully removed from this content model object or any of its children. False otherwise.

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.

Parameters:
ord The maximum ordinal value for this content model object.

Definition at line 77 of file daeMetaCMPolicy.h.


Member Data Documentation

Definition at line 102 of file daeMetaCMPolicy.h.

Definition at line 100 of file daeMetaCMPolicy.h.

Maximum number of times this meta element can occur. -1 for unbounded

Definition at line 107 of file daeMetaCMPolicy.h.

Definition at line 109 of file daeMetaCMPolicy.h.

Minimum number of times this meta element can occur.

Definition at line 105 of file daeMetaCMPolicy.h.

Definition at line 110 of file daeMetaCMPolicy.h.

Definition at line 101 of file daeMetaCMPolicy.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


colladadom
Author(s): Du Hung Hou, Khronos.org, Marcus Barnes, Greg Corson, Herbert Law, Sebastian Schwarz, Steven Thomas, John Hsu (ros package), Tim Field (ros package)
autogenerated on Fri Jan 11 09:29:14 2013