daeMetaElement Class Reference

#include <daeMetaElement.h>

Inheritance diagram for daeMetaElement:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DLLSPEC void addCMDataArray (daeInt offset, daeUInt numChoices)
DLLSPEC void addContents (daeInt offset)
DLLSPEC void addContentsOrder (daeInt offset)
DLLSPEC void appendAttribute (daeMetaAttribute *attr)
DLLSPEC daeElementRef create (daeString childElementTypeName)
DLLSPEC daeElementRef create ()
DLLSPEC daeMetaElement (DAE &dae)
daeBool getAllowsAny ()
DLLSPEC void getChildren (daeElement *parent, daeElementRefArray &array)
daeMetaCMPolicygetCMRoot ()
daeMetaElementArrayAttributegetContents ()
DAEgetDAE ()
daeInt getElementSize ()
daeMetaAttributegetIDAttribute ()
daeBool getIsAbstract ()
daeBool getIsInnerClass ()
daeBool getIsTrackableForQueries ()
daeBool getIsTransparent ()
DLLSPEC daeMetaAttributegetMetaAttribute (daeString s)
daeMetaAttributeRefArraygetMetaAttributes ()
daeMetaArrayAttributegetMetaCMData ()
daeStringRef getName ()
daeUInt getNumChoices () const
daeMetaAttributegetValueAttribute ()
DLLSPEC daeBool place (daeElement *parent, daeElement *child, daeUInt *ordinal=NULL)
DLLSPEC daeBool placeAfter (daeElement *marker, daeElement *parent, daeElement *child, daeUInt *ordinal=NULL)
DLLSPEC daeBool placeAt (daeInt index, daeElement *parent, daeElement *child)
DLLSPEC daeBool placeBefore (daeElement *marker, daeElement *parent, daeElement *child, daeUInt *ordinal=NULL)
void registerClass (daeElementConstructFunctionPtr func)
DLLSPEC daeBool remove (daeElement *parent, daeElement *child)
void setAllowsAny (daeBool allows)
DLLSPEC void setCMRoot (daeMetaCMPolicy *cm)
void setElementSize (daeInt size)
void setIsAbstract (daeBool abstract)
void setIsInnerClass (daeBool ic)
void setIsTrackableForQueries (daeBool trackable)
void setIsTransparent (daeBool transparent)
void setName (daeString s)
DLLSPEC void validate ()
DLLSPEC ~daeMetaElement ()

Protected Attributes

daeBool _allowsAny
daeMetaCMPolicy_contentModel
daeElementConstructFunctionPtr _createFunc
daeInt _elementSize
daeBool _innerClass
daeBool _isAbstract
daeBool _isTrackableForQueries
daeBool _isTransparent
daeMetaAttributeRefArray _metaAttributes
daeMetaArrayAttribute_metaCMData
daeMetaElementArrayAttribute_metaContents
daeMetaArrayAttribute_metaContentsOrder
daeMetaAttributeRef _metaID
daeMetaAttributeRef _metaValue
daeStringRef _name
daeUInt _numMetaChoices
daeBool _usesStringContents
DAEdae

Detailed Description

Each instance of the daeMetaElement class describes a C++ COLLADA dom element type.

The meta information in daeMetaElement is a combination of the information required to create and maintain C++ object instances and the information necessary to parse and construct a hierarchy of COLLADA elements.
daeMetaElement objects also act as factories for C++ COLLADA dom classes where each daeElement is capable of creating an instance of the class it describes. Further, each daeMetaElement contains references to other daeMetaElements for potential XML children elements. This enables this system to easily create daeElements of the appropriate type while navigating through XML recursive parse.
See daeElement for information about the functionality that every daeElement implements.

Definition at line 42 of file daeMetaElement.h.


Constructor & Destructor Documentation

DLLSPEC daeMetaElement::daeMetaElement ( DAE dae  ) 

Constructor

DLLSPEC daeMetaElement::~daeMetaElement (  ) 

Destructor


Member Function Documentation

DLLSPEC void daeMetaElement::addCMDataArray ( daeInt  offset,
daeUInt  numChoices 
)

Registers with the reflective object system that the dom class described by this daeMetaElement contains at least one choice group in the content model for this element. This method is only for daeMetaElement contstuction, and should only be called by the system as it sets up the Reflective Object System.

Parameters:
offset Byte offset for the contents field in the C++ element class.
numChoices The number of choice content model blocks there are for this element type.
DLLSPEC void daeMetaElement::addContents ( daeInt  offset  ) 

Registers with the reflective object system that the dom class described by this daeMetaElement contains a _contents array. This method is only for daeMetaElement contstuction, and should only be called by the system as it sets up the Reflective Object System.

Parameters:
offset Byte offset for the contents field in the C++ element class.
DLLSPEC void daeMetaElement::addContentsOrder ( daeInt  offset  ) 

Registers with the reflective object system the array that stores the _contents ordering. This method is only for daeMetaElement contstuction, and should only be called by the system as it sets up the Reflective Object System.

Parameters:
offset Byte offset for the contents order array in the C++ element class.
DLLSPEC void daeMetaElement::appendAttribute ( daeMetaAttribute attr  ) 

Appends a daeMetaAttribute that represents a field corresponding to an XML attribute to the C++ version of this element type.

Parameters:
attr Attribute to append to this element types list of potential attributes.
DLLSPEC daeElementRef daeMetaElement::create ( daeString  childElementTypeName  ) 

Looks through the list of potential child elements for this element type finding the corresponding element type; if a corresponding element type is found, use that type as a factory and return an instance of that child type. Typically place() is called after create(childelementname)

Parameters:
childElementTypeName Type name to create.
Returns:
Returns the created element if the type was found as a potential child element.
DLLSPEC daeElementRef daeMetaElement::create (  ) 

Invokes the factory element creation routine set by registerConstructor() to return a C++ COLLADA Object Model instance of this element type.

Returns:
Returns a created daeElement of appropriate type via the object creation function and the daeElement::setup() function.
daeBool daeMetaElement::getAllowsAny (  )  [inline]

Determines if elements of this type allow for any element as a child.

Returns:
Returns true if this element can have any child element, false otherwise.

Definition at line 142 of file daeMetaElement.h.

DLLSPEC void daeMetaElement::getChildren ( daeElement parent,
daeElementRefArray array 
)

Gets all of the children from an element of this type.

Parameters:
parent The element that you want to get the children from.
array The return value. An elementref array to append this element's children to.
daeMetaCMPolicy* daeMetaElement::getCMRoot (  )  [inline]

Gets the root of the content model policy tree.

Returns:
Returns the root element of the tree of content model policy elements.

Definition at line 347 of file daeMetaElement.h.

daeMetaElementArrayAttribute* daeMetaElement::getContents (  )  [inline]

Gets the attribute associated with the contents meta information.

See also:
addContents()
Returns:
Returns the daeMetaElementArrayAttribute.

Definition at line 237 of file daeMetaElement.h.

DAE* daeMetaElement::getDAE (  ) 

Gets the DAE object that owns this daeMetaElement.

Returns:
Returns the owning DAE.
daeInt daeMetaElement::getElementSize (  )  [inline]

Gets the size in bytes of each instance of this element type. Used for factory element creation.

Returns:
Returns the number of bytes for each C++ element instance.

Definition at line 205 of file daeMetaElement.h.

daeMetaAttribute* daeMetaElement::getIDAttribute (  )  [inline]

Gets the daeMetaAttribute for the ID attribute of a daeElement.

Returns:
Returns the ID daeMetaAttribute, or NULL if the element type does not have an ID attribute.

Definition at line 163 of file daeMetaElement.h.

daeBool daeMetaElement::getIsAbstract (  )  [inline]

Determines if elements of this type can be placed in the object model.

Returns:
Returns true if this element type is abstract, false otherwise.

Definition at line 104 of file daeMetaElement.h.

daeBool daeMetaElement::getIsInnerClass (  )  [inline]

Determines if elements of this type is an inner class.

Returns:
Returns true if this element type is an inner class.

Definition at line 94 of file daeMetaElement.h.

daeBool daeMetaElement::getIsTrackableForQueries (  )  [inline]

Determines if elements of this type should be tracked for daeDatabase queries.

Returns:
Returns true if this element type should be tracked

Definition at line 126 of file daeMetaElement.h.

daeBool daeMetaElement::getIsTransparent (  )  [inline]

Determines if elements of this type should have an element tag printed when saving.

Returns:
Returns true if this element type should not have a tag, false otherwise.

Definition at line 109 of file daeMetaElement.h.

DLLSPEC daeMetaAttribute* daeMetaElement::getMetaAttribute ( daeString  s  ) 

Gets the attribute which has a name as provided by the s parameter.

Parameters:
s String containing the desired attribute's name.
Returns:
Returns the corresponding daeMetaAttribute, or NULL if none found.
daeMetaAttributeRefArray& daeMetaElement::getMetaAttributes (  )  [inline]

Gets the array of all known attributes on this element type. This includes all meta attributes except those describing child elements. It does include the value element.

Returns:
Returns the array of daeMetaAttributeRefs.

Definition at line 183 of file daeMetaElement.h.

daeMetaArrayAttribute* daeMetaElement::getMetaCMData (  )  [inline]

Gets the attribute associated with the CMData array meta information.

See also:
addCMDataArray()
Returns:
Returns the daeMetaArrayAttribute for the CMData of an element.

Definition at line 243 of file daeMetaElement.h.

daeStringRef daeMetaElement::getName (  )  [inline]

Gets the name of this element type.

Returns:
Returns the name of this element type.

Definition at line 169 of file daeMetaElement.h.

daeUInt daeMetaElement::getNumChoices (  )  const [inline]

Gets the number of choice content model blocks there are for this element type.

Returns:
Returns the number of daeMetaChoice's there are in the content model.

Definition at line 248 of file daeMetaElement.h.

daeMetaAttribute* daeMetaElement::getValueAttribute (  )  [inline]

Gets the daeMetaAttribute for the non-element contents of a daeElement. This corresponds to a daeMetaFloatAttribute, daeMetaFloatArrayAttribute, et cetera.

Returns:
Returns the daeMetaAttribute pointer for the non-element contents of this element type.

Definition at line 156 of file daeMetaElement.h.

DLLSPEC daeBool daeMetaElement::place ( daeElement parent,
daeElement child,
daeUInt ordinal = NULL 
)

Places a child element into the parent element where the calling object is the daeMetaElement for the parent element.

Parameters:
parent Element to act as the container.
child Child element to place in the parent.
Returns:
Returns true if the operation was successful, false otherwise.
DLLSPEC daeBool daeMetaElement::placeAfter ( daeElement marker,
daeElement parent,
daeElement child,
daeUInt ordinal = NULL 
)

Places a child element into the parent element at a specific location which is right after the marker element.

Parameters:
marker The element location in the contents array to insert after.
parent Element to act as the container.
child Child element to place in the parent.
Returns:
Returns true if the operation was successful, false otherwise.
DLLSPEC daeBool daeMetaElement::placeAt ( daeInt  index,
daeElement parent,
daeElement child 
)

Places a child element into the parent element at a specific location where the calling object is the daeMetaElement for the parent element.

Parameters:
index The location in the contents array to insert.
parent Element to act as the container.
child Child element to place in the parent.
Returns:
Returns true if the operation was successful, false otherwise.
Note:
This should only be called on elements that have a _contents array. Elements without a _contents array will be placed normally.
DLLSPEC daeBool daeMetaElement::placeBefore ( daeElement marker,
daeElement parent,
daeElement child,
daeUInt ordinal = NULL 
)

Places a child element into the parent element at a specific location which is right before the marker element.

Parameters:
marker The element location in the contents array to insert before.
parent Element to act as the container.
child Child element to place in the parent.
Returns:
Returns true if the operation was successful, false otherwise.
void daeMetaElement::registerClass ( daeElementConstructFunctionPtr  func  )  [inline]

Registers the function that can construct a C++ instance of this class. Necessary for the factory system such that C++ can still call new and the vptr will still be initialized even when constructed via the factory system.

Parameters:
func Pointer to a function that does object construction.

Definition at line 264 of file daeMetaElement.h.

DLLSPEC daeBool daeMetaElement::remove ( daeElement parent,
daeElement child 
)

Removes a child element from its parent element.

Parameters:
parent Element That is the parent.
child Child element to remove.
Returns:
Returns true if the operation was successful, false otherwise.
void daeMetaElement::setAllowsAny ( daeBool  allows  )  [inline]

Sets if elements of this type allow for any element as a child.

Parameters:
allows True if this element allows for any child element, false otherwise.

Definition at line 147 of file daeMetaElement.h.

DLLSPEC void daeMetaElement::setCMRoot ( daeMetaCMPolicy cm  ) 

Sets the root of the content model policy tree.

Parameters:
cm The root element of the tree of content model policy elements.
void daeMetaElement::setElementSize ( daeInt  size  )  [inline]

Sets the size in bytes of each instance of this element type. Used for factory element creation.

Parameters:
size Number of bytes for each C++ element instance.

Definition at line 198 of file daeMetaElement.h.

void daeMetaElement::setIsAbstract ( daeBool  abstract  )  [inline]

Sets if elements of this type are abstract.

Parameters:
abstract True if this type is abstract.

Definition at line 114 of file daeMetaElement.h.

void daeMetaElement::setIsInnerClass ( daeBool  ic  )  [inline]

Sets if elements of this type are inner classes.

Parameters:
abstract True if this type is an inner class.

Definition at line 99 of file daeMetaElement.h.

void daeMetaElement::setIsTrackableForQueries ( daeBool  trackable  )  [inline]

Sets whether elements of this type should be tracked for daeDatabase queries.

Parameters:
trackable Indicates whether this element should be tracked. A value of true indicates this element type should be tracked and be available for database queries.

Definition at line 135 of file daeMetaElement.h.

void daeMetaElement::setIsTransparent ( daeBool  transparent  )  [inline]

Sets whether or not elements of this type should have an element tag printed when saving.

Parameters:
transparent True if this type is transparent.

Definition at line 119 of file daeMetaElement.h.

void daeMetaElement::setName ( daeString  s  )  [inline]

Sets the name of this element type.

Parameters:
s String name to set.

Definition at line 175 of file daeMetaElement.h.

DLLSPEC void daeMetaElement::validate (  ) 

Validates this class to be used by the runtime c++ object model including factory creation.


Member Data Documentation

Definition at line 62 of file daeMetaElement.h.

Definition at line 65 of file daeMetaElement.h.

Definition at line 47 of file daeMetaElement.h.

Definition at line 48 of file daeMetaElement.h.

Definition at line 63 of file daeMetaElement.h.

Definition at line 61 of file daeMetaElement.h.

Definition at line 57 of file daeMetaElement.h.

Definition at line 60 of file daeMetaElement.h.

Definition at line 50 of file daeMetaElement.h.

Definition at line 66 of file daeMetaElement.h.

Definition at line 52 of file daeMetaElement.h.

Definition at line 53 of file daeMetaElement.h.

Definition at line 55 of file daeMetaElement.h.

Definition at line 51 of file daeMetaElement.h.

Definition at line 45 of file daeMetaElement.h.

Definition at line 67 of file daeMetaElement.h.

Definition at line 58 of file daeMetaElement.h.

DAE& daeMetaElement::dae [protected]

Definition at line 69 of file daeMetaElement.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