#include <daeIDRef.h>
Public Types | |
| enum | ResolveState { id_empty, id_loaded, id_pending, id_success, id_failed_id_not_found, id_failed_invalid_id, id_failed_invalid_reference, id_failed_externalization, id_failed_no_document } |
Public Member Functions | |
| void | copyFrom (const daeIDRef &from) |
| daeIDRef (daeElement &container) | |
| daeIDRef (const daeIDRef &constructFromIDRef) | |
| daeIDRef (daeString id) | |
| daeIDRef () | |
| daeIDRef & | get (daeUInt idx) |
| daeElement * | getContainer () const |
| size_t | getCount () const |
| daeElement * | getElement () const |
| daeString | getID () const |
| ResolveState | getState () const |
| void | initialize () |
| daeIDRef & | operator= (const daeIDRef &other) |
| bool | operator== (const daeIDRef &other) const |
| daeIDRef & | operator[] (size_t index) |
| void | print () |
| void | reset () |
| void | resolveElement (daeString typeNameHint=NULL) |
| void | resolveID () |
| void | setContainer (daeElement *cont) |
| void | setID (daeString ID) |
| void | validate () |
Private Attributes | |
| daeElement * | container |
| std::string | id |
The daeIDRef is a simple class designed to aid in the parsing and resolution of ID references inside of COLLADA elements. A daeIDRef is created for every IDREF data type in the COLLADA schema. It also has the capability to attempt to resolve this reference into a daeElement. If a daeIDRef is stored within a daeElement it fills in its container field to point to the containing element.
The main API is the daeIDRef::resolveElement() will use a daeIDRefResolver to search for the daeElement inside of a daeDatabase.
Definition at line 29 of file daeIDRef.h.
An enum describing the status of the ID resolution process.
Definition at line 35 of file daeIDRef.h.
| daeIDRef::daeIDRef | ( | ) |
Simple Constructor
| daeIDRef::daeIDRef | ( | daeString | id | ) |
| daeIDRef::daeIDRef | ( | const daeIDRef & | constructFromIDRef | ) |
Constructs a new id reference by copying an existing one.
| constructFromIDRef | daeIDRef to copy into this one. |
| daeIDRef::daeIDRef | ( | daeElement & | container | ) |
Constructs an id reference with a container element
| container | The container element. |
| void daeIDRef::copyFrom | ( | const daeIDRef & | from | ) |
| daeElement* daeIDRef::getContainer | ( | ) | const |
Gets a pointer to the daeElement that contains this URI.
| size_t daeIDRef::getCount | ( | ) | const |
| daeElement* daeIDRef::getElement | ( | ) | const |
Gets the element that this URI resolves to in memory.
| daeString daeIDRef::getID | ( | ) | const |
Gets the ID string
id. | ResolveState daeIDRef::getState | ( | ) | const |
| void daeIDRef::initialize | ( | ) |
Initializes the daeIDREf, setting id, element, and container to NULL.
Assignment operator.
| bool daeIDRef::operator== | ( | const daeIDRef & | other | ) | const |
Comparison operator.
| daeIDRef& daeIDRef::operator[] | ( | size_t | index | ) |
| void daeIDRef::print | ( | ) |
Outputs all components of this daeIDRef to stderr.
| void daeIDRef::reset | ( | ) |
Resets this daeIDRef; frees all string references and returns state to empty.
| void daeIDRef::resolveElement | ( | daeString | typeNameHint = NULL |
) |
| void daeIDRef::resolveID | ( | ) |
| void daeIDRef::setContainer | ( | daeElement * | cont | ) |
Sets the pointer to the daeElement that contains this URI.
| cont | Pointer to the containing daeElmement. |
| void daeIDRef::setID | ( | daeString | ID | ) |
| void daeIDRef::validate | ( | ) |
daeElement* daeIDRef::container [private] |
Element that owns this ID (if any)
Definition at line 62 of file daeIDRef.h.
std::string daeIDRef::id [private] |
ID used to refer to another element
Definition at line 59 of file daeIDRef.h.