#include <daeSIDResolver.h>
Public Types | |
enum | ResolveState { target_empty, target_loaded, sid_failed_not_found, sid_success_element, sid_success_array, sid_success_double } |
Public Member Functions | |
daeSIDResolver (daeElement *container, daeString target, daeString platform=NULL) | |
daeElement * | getContainer () const |
daeDouble * | getDouble () |
daeDoubleArray * | getDoubleArray () |
daeElement * | getElement () |
daeString | getProfile () const |
ResolveState | getState () const |
daeString | getTarget () const |
void | setContainer (daeElement *element) |
void | setProfile (daeString p) |
void | setTarget (daeString t) |
Private Attributes | |
daeElement * | container |
std::string | profile |
std::string | target |
The daeSIDResolver class is designed to resolve sid references within a COLLADA document. The rules for sid resolution are set forth by the Addressing Syntax section in Chapter 3 of the COLLADA specification which can be found at https://www.khronos.org/collada . This resolver always attempts to resolve to the daeElement which is referenced. If the element contains a daeDoubleArray (domFloatArray) value, the resolver will set the pointer to that array. The resolver will also do this if the sid target points to a <source> element which has a <float_array> as a child. If the sid target specifies a value, i.e. blah.X or blah(6), the resolver will attempt to get a pointer to that specific value. The resolver only attempts to resolve to that level for values which are defined in the COMMON profile glossary of the COLLADA specification, or values reference with the (#) syntax. You can check the return value from getState() to see which level of resolution is possible.
Definition at line 58 of file daeSIDResolver.h.
An enum describing the status of the SID resolution process.
Definition at line 64 of file daeSIDResolver.h.
daeSIDResolver::daeSIDResolver | ( | daeElement * | container, | |
daeString | target, | |||
daeString | platform = NULL | |||
) |
Constructor.
container | The element which contains the target that you want to resolve. | |
target | The target string which needs to be resolved. | |
platform | The platform name of the technique to use. A NULL value indicates the common platform. |
daeElement* daeSIDResolver::getContainer | ( | ) | const |
Gets a pointer to the daeElement
that contains the target to resolve.
daeDouble* daeSIDResolver::getDouble | ( | ) |
Gets a pointer to the particle this target resolved to.
daeDoubleArray* daeSIDResolver::getDoubleArray | ( | ) |
Gets the value array of the element that the SID resolves to.
daeElement* daeSIDResolver::getElement | ( | ) |
Gets the element that this SID resolves to.
daeString daeSIDResolver::getProfile | ( | ) | const |
Gets the name of the profile to use when resolving.
ResolveState daeSIDResolver::getState | ( | ) | const |
daeString daeSIDResolver::getTarget | ( | ) | const |
Gets the target string.
void daeSIDResolver::setContainer | ( | daeElement * | element | ) |
Sets the pointer to the daeElement
that contains the target to resolve.
element | Pointer to the containing daeElmement . |
void daeSIDResolver::setProfile | ( | daeString | p | ) |
Sets the profile to use when resolving.
p | The profile name of the technique to use. A NULL value indicates the common profile. |
void daeSIDResolver::setTarget | ( | daeString | t | ) |
Sets the target string.
t | The new target string for this resolver. |
daeElement* daeSIDResolver::container [private] |
Definition at line 149 of file daeSIDResolver.h.
std::string daeSIDResolver::profile [private] |
Definition at line 148 of file daeSIDResolver.h.
std::string daeSIDResolver::target [private] |
Definition at line 147 of file daeSIDResolver.h.