#include <FCDObjectWithId.h>
Inheritance diagram for FCDObjectWithId:
Public Member Functions | |
DeclareFlag (DaeIdChanged, 1) | |
DeclareFlagCount (2) | |
5 flags are locally declared. | |
FCDObjectWithId (FCDocument *document, const char *baseId="ObjectWithID") | |
Constructor: sets the prefix COLLADA id to be used if no COLLADA id is provided. | |
virtual | ~FCDObjectWithId () |
Destructor. | |
const fm::string & | GetDaeId () const |
Retrieves the unique COLLADA id for this object. | |
void | SetDaeId (const fm::string &id) |
Sets the COLLADA id for this object. | |
void | SetDaeId (fm::string &id) |
Sets the COLLADA id for this object. | |
void | RemoveDaeId () |
[INTERNAL] Release the unique COLLADA id of an object. | |
void | Clone (FCDObjectWithId *clone) const |
[INTERNAL] Clones the object. | |
Static Public Member Functions | |
static fm::string | CleanId (const char *id) |
Cleans up a given name into a valid COLLADA id. | |
static const fm::string | CleanId (const fm::string &id) |
See above. | |
static fm::string | CleanSubId (const char *sid) |
Cleans up a given name into a valid COLLADA sub-id. | |
static const fm::string | CleanSubId (const fm::string &sid) |
See above. |
Many COLLADA structures such as entities and sources need a unique COLLADA id. The COLLADA document contains a map of all the COLLADA ids known in its scope. The interface of the FCDObjectWithId class allows for the retrieval and the modification of the unique COLLADA id attached to these objects.
A unique COLLADA id is built, if none are provided, using the 'baseId' field of the constructor. A unique COLLADA id is generated only on demand.
|
Constructor: sets the prefix COLLADA id to be used if no COLLADA id is provided.
|
|
Cleans up a given name into a valid COLLADA id. This function does no check for uniqueness.
|
|
Cleans up a given name into a valid COLLADA sub-id. This function does no check for uniqueness. Sub-ids support even less characters than ids.
|
|
[INTERNAL] Clones the object. The unique COLLADA id will be copied over to the clone object. Use carefully: when a cloned object with an id is released, it does remove the unique COLLADA id from the unique name map.
|
|
Retrieves the unique COLLADA id for this object. If no unique COLLADA id has been previously generated or provided, this function has the side-effect of generating a unique COLLADA id.
|
|
[INTERNAL] Release the unique COLLADA id of an object. Use this function wisely, as it leaves the object id-less and without a way to automatically generate a COLLADA id. |
|
Sets the COLLADA id for this object. There is no guarantee that the given COLLADA id will be used, as it may not be unique.
|
|
Sets the COLLADA id for this object. There is no guarantee that the given COLLADA id will be used, as it may not be unique. You can call the GetDaeId function after this call to retrieve the final, unique COLLADA id.
|