daeSIDResolver Class Reference

#include <daeSIDResolver.h>

List of all members.

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)
daeElementgetContainer () const
daeDoublegetDouble ()
daeDoubleArraygetDoubleArray ()
daeElementgetElement ()
daeString getProfile () const
ResolveState getState () const
daeString getTarget () const
void setContainer (daeElement *element)
void setProfile (daeString p)
void setTarget (daeString t)

Private Attributes

daeElementcontainer
std::string profile
std::string target

Detailed Description

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.


Member Enumeration Documentation

An enum describing the status of the SID resolution process.

Enumerator:
target_empty 

No target specified

target_loaded 

target specified but not resolved

sid_failed_not_found 

Resolution failed because target was not found

sid_success_element 

Resolution successful to the Element level

sid_success_array 

Resolution successful to the Double Array level

sid_success_double 

Resolution successful to the Double level

Definition at line 64 of file daeSIDResolver.h.


Constructor & Destructor Documentation

daeSIDResolver::daeSIDResolver ( daeElement container,
daeString  target,
daeString  platform = NULL 
)

Constructor.

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

Member Function Documentation

daeElement* daeSIDResolver::getContainer (  )  const

Gets a pointer to the daeElement that contains the target to resolve.

Returns:
Returns the pointer to the containing daeElmement.
daeDouble* daeSIDResolver::getDouble (  ) 

Gets a pointer to the particle this target resolved to.

Returns:
Returns a pointer to a double value which is the fully resolved target.
Note:
The daeSIDResolver can only resolve to this level for domDouble values and only if the final symbolic name is from the COMMON profile or a cardinal value is specified.
The daeSIDResolver assumes the value is a 4x4 matrix if there are 2 cardinal values specified.
daeDoubleArray* daeSIDResolver::getDoubleArray (  ) 

Gets the value array of the element that the SID resolves to.

Returns:
Returns a pointer to the value array that the SID resolves to
Note:
The daeSIDResolver can only resolve to this level for daeDoubleArray values.
daeElement* daeSIDResolver::getElement (  ) 

Gets the element that this SID resolves to.

Returns:
Returns the element that the URI resolves to.
daeString daeSIDResolver::getProfile (  )  const

Gets the name of the profile to use when resolving.

Returns:
Returns the name of the profile or NULL for the common profile.
ResolveState daeSIDResolver::getState (  )  const
daeString daeSIDResolver::getTarget (  )  const

Gets the target string.

Returns:
Returns the target string of this SID resolver.
void daeSIDResolver::setContainer ( daeElement element  ) 

Sets the pointer to the daeElement that contains the target to resolve.

Parameters:
element Pointer to the containing daeElmement.
void daeSIDResolver::setProfile ( daeString  p  ) 

Sets the profile to use when resolving.

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

Parameters:
t The new target string for this resolver.

Member Data Documentation

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.


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:15 2013