#include <daeMetaAttribute.h>

The daeMetaAttribute class describes one attribute in a C++ COLLADA dom element.
In the case of the C++ object model a conceptual attribute can be either a dom attribute, a dom element, or a dom value. Essentially, the meta attribute describes fields on the C++ class. However these attributes are stored separately in the containing meta daeMetaElement. daeMetaAttributes always exist inside of daeMetaElements. Each daeMetaAttribute has certain semantic operations it is capable of including set(), get(), and print(). daeMetaAttributes use the daeAtomicType system as their underlying semantic implementation, but contain additional information about the packaging of the atomic types into the C++ dom classes such as offset, and array information.
Definition at line 41 of file daeMetaAttribute.h.
| daeMetaAttribute::daeMetaAttribute | ( | ) |
Constructor
| virtual daeMetaAttribute::~daeMetaAttribute | ( | ) | [virtual] |
Destructor
| virtual daeInt daeMetaAttribute::compare | ( | daeElement * | elt1, | |
| daeElement * | elt2 | |||
| ) | [virtual] |
Compares the value of this attribute in the given elements.
| elt1 | The first element whose attribute value should be compared. | |
| elt2 | The second element whose attribute value should be compared. |
Reimplemented in daeMetaArrayAttribute.
| virtual daeInt daeMetaAttribute::compareToDefault | ( | daeElement * | e | ) | [virtual] |
Compares the value of this attribute from the given element to the default value of this attribute (if one exists).
| e | The element whose value should be compared to the default value. |
Reimplemented in daeMetaArrayAttribute.
| virtual void daeMetaAttribute::copy | ( | daeElement * | toElement, | |
| daeElement * | fromElement | |||
| ) | [virtual] |
Copies the value of this attribute from fromElement into toElement.
| toElement | Pointer to a daeElement to copy this attribute to. | |
| fromElement | Pointer to a daeElement to copy this attribute from. |
Reimplemented in daeMetaArrayAttribute, daeMetaElementAttribute, and daeMetaElementArrayAttribute.
| virtual void daeMetaAttribute::copyDefault | ( | daeElement * | element | ) | [virtual] |
Copies the default value of this attribute to the element
| element | Pointer to a daeElement to copy the default value to. |
Reimplemented in daeMetaArrayAttribute.
| virtual daeMemoryRef daeMetaAttribute::get | ( | daeElement * | e | ) | [virtual] |
Gets the attribute's memory pointer from containing element e.
| e | Containing element from which to get the value. |
| virtual daeInt daeMetaAttribute::getAlignment | ( | ) | [virtual] |
Gets the alignment in bytes on the class of this meta attribute type.
| daeMetaElement* daeMetaAttribute::getContainer | ( | ) | [inline] |
Gets the containing daeMetaElement for this attribute.
daeMetaElement to which this daeAttribute belongs. Definition at line 149 of file daeMetaAttribute.h.
| daeString daeMetaAttribute::getDefaultString | ( | ) |
Gets the default for this attribute as a string.
daeString representing the default value. | daeMemoryRef daeMetaAttribute::getDefaultValue | ( | ) |
Gets the default for this attribute as a memory value.
daeMemoryRef representing the default value. | daeBool daeMetaAttribute::getIsRequired | ( | ) | [inline] |
Determines if the schema indicates that this is a required attribute.
Definition at line 67 of file daeMetaAttribute.h.
| daeStringRef daeMetaAttribute::getName | ( | ) | [inline] |
Gets the name of this attribute.
Definition at line 99 of file daeMetaAttribute.h.
| daeInt daeMetaAttribute::getOffset | ( | ) | [inline] |
Gets the byte offset (from @ this) where this attribute's storage is found in its container element class.
this pointer for this attribute. Definition at line 86 of file daeMetaAttribute.h.
| virtual daeInt daeMetaAttribute::getSize | ( | ) | [virtual] |
Gets the number of bytes for this attribute.
| daeAtomicType* daeMetaAttribute::getType | ( | ) | [inline] |
Gets the daeAtomicType used by this attribute.
daeAtomicType that this attribute uses for its implementation. Definition at line 113 of file daeMetaAttribute.h.
| virtual daeChar* daeMetaAttribute::getWritableMemory | ( | daeElement * | e | ) | [virtual] |
| virtual daeBool daeMetaAttribute::isArrayAttribute | ( | ) | [inline, virtual] |
Gets if this attribute is an array attribute.
Reimplemented in daeMetaArrayAttribute, daeMetaElementAttribute, and daeMetaElementArrayAttribute.
Definition at line 177 of file daeMetaAttribute.h.
| virtual void daeMetaAttribute::memoryToString | ( | daeElement * | e, | |
| std::ostringstream & | buffer | |||
| ) | [virtual] |
Converts an element's attribute value to a string.
Reimplemented in daeMetaArrayAttribute.
| virtual void daeMetaAttribute::set | ( | daeElement * | element, | |
| daeString | s | |||
| ) | [virtual] |
Reimplemented in daeMetaElementAttribute.
| void daeMetaAttribute::setContainer | ( | daeMetaElement * | container | ) | [inline] |
Sets the containing daeMetaElement for this attribute.
| container | Element on which this daeMetaAttribute belongs. |
Definition at line 143 of file daeMetaAttribute.h.
| virtual void daeMetaAttribute::setDefaultString | ( | daeString | defaultVal | ) | [virtual] |
Sets the default for this attribute via a string.
| defaultVal | daeString representing the default value. |
Reimplemented in daeMetaArrayAttribute.
| virtual void daeMetaAttribute::setDefaultValue | ( | daeMemoryRef | defaultVal | ) | [virtual] |
Sets the default for this attribute via a memory pointer.
| defaultVal | daeMemoryRef representing the default value. |
Reimplemented in daeMetaArrayAttribute.
| virtual void daeMetaAttribute::setDocument | ( | daeElement * | e, | |
| daeDocument * | doc | |||
| ) | [virtual] |
Notifies an attribute when the containing document changes.
Reimplemented in daeMetaArrayAttribute, daeMetaElementAttribute, and daeMetaElementArrayAttribute.
| void daeMetaAttribute::setIsRequired | ( | daeBool | isRequired | ) | [inline] |
Sets the value that indicates that this attribute is required by the schema. If set, the attribute will always be exported by the API regardless of its value.
| isRequired | Indicates if the schema says this attribute is required, true if it is, false if not. |
Definition at line 73 of file daeMetaAttribute.h.
| void daeMetaAttribute::setName | ( | daeString | name | ) | [inline] |
Sets the name of the attribute.
| name | daeString that is directly stored as a pointer without being copied. |
Definition at line 93 of file daeMetaAttribute.h.
| void daeMetaAttribute::setOffset | ( | daeInt | offset | ) | [inline] |
Sets the byte offset (from this) where this attribute's storage is found in its container element class.
| offset | Integer byte offset from this pointer. |
Definition at line 79 of file daeMetaAttribute.h.
| void daeMetaAttribute::setType | ( | daeAtomicType * | type | ) | [inline] |
Sets the type of the attribute.
| type | daeAtomicType to use for interacting with this attribute in a containing daeElement. |
Definition at line 106 of file daeMetaAttribute.h.
| virtual void daeMetaAttribute::stringToMemory | ( | daeElement * | e, | |
| daeString | s | |||
| ) | [virtual] |
Converts a string to a memory value in the specified element.
Reimplemented in daeMetaArrayAttribute.
daeMetaElement* daeMetaAttribute::_container [protected] |
Definition at line 47 of file daeMetaAttribute.h.
std::string daeMetaAttribute::_defaultString [protected] |
Definition at line 48 of file daeMetaAttribute.h.
daeMemoryRef daeMetaAttribute::_defaultValue [protected] |
Definition at line 49 of file daeMetaAttribute.h.
daeBool daeMetaAttribute::_isRequired [protected] |
Definition at line 50 of file daeMetaAttribute.h.
daeStringRef daeMetaAttribute::_name [protected] |
Definition at line 44 of file daeMetaAttribute.h.
daeInt daeMetaAttribute::_offset [protected] |
Definition at line 45 of file daeMetaAttribute.h.
daeAtomicType* daeMetaAttribute::_type [protected] |
Definition at line 46 of file daeMetaAttribute.h.