#include <daeDocument.h>
Public Member Functions | |
void | changeElementID (daeElementRef element, daeString newID) |
void | changeElementSID (daeElementRef element, daeString newSID) |
daeDocument (DAE &dae, bool zaeRootDocument=false, const std::string &extractedFileURI="") | |
DAE * | getDAE () |
daeDatabase * | getDatabase () |
const daeURI * | getDocumentURI () const |
daeURI * | getDocumentURI () |
daeElement * | getDomRoot () const |
const daeURI & | getExtractedFileURI () |
void | insertElement (daeElementRef element) |
bool | isZAERootDocument () |
void | removeElement (daeElementRef element) |
void | setDomRoot (daeElement *domRoot) |
~daeDocument () | |
Private Attributes | |
DAE * | dae |
daeElementRef | dom |
daeURI | mExtractedFileURI |
bool | mZAERootDocument |
daeURI | uri |
The daeDocument
class implements a COLLADA runtime database entry.
Definition at line 23 of file daeDocument.h.
daeDocument::daeDocument | ( | DAE & | dae, | |
bool | zaeRootDocument = false , |
|||
const std::string & | extractedFileURI = "" | |||
) |
Constructor
dae | The dae that owns this document. | |
zaeRootDocument | Indicates if the new document is the root document of a ZAE archive. | |
extractedFileURI | URI to extracted dae file. |
daeDocument::~daeDocument | ( | ) |
Destructor
void daeDocument::changeElementID | ( | daeElementRef | element, | |
daeString | newID | |||
) |
This function is used to track how a document gets modified. It gets called internally.
element | The element whose ID is about to be changed. | |
newID | The ID that is going to be assigned to the element. |
void daeDocument::changeElementSID | ( | daeElementRef | element, | |
daeString | newSID | |||
) |
This function is just like changeElementID, except it keeps track of sids instead of IDs.
element | The element whose sid is about to be changed. | |
newSID | The sid that is going to be assigned to the element. |
DAE* daeDocument::getDAE | ( | ) |
daeDatabase* daeDocument::getDatabase | ( | ) |
Accessor to get the database associated with this document.
const daeURI* daeDocument::getDocumentURI | ( | ) | const [inline] |
Const accessor to get the URI associated with the document in this collection; this is currently set to the URI from which the collection was loaded, but is blank if the collection was created with insertCollection()
.
Definition at line 68 of file daeDocument.h.
daeURI* daeDocument::getDocumentURI | ( | ) | [inline] |
Accessor to get the URI associated with the document in this document; this is currently set to the URI from which the document was loaded, but is blank if the document was created with insertDocument()
.
Definition at line 59 of file daeDocument.h.
daeElement* daeDocument::getDomRoot | ( | ) | const [inline] |
Accessor to get the domCollada
associated with this document.
daeElementRef
for the domCollada
that is the root of this document. dae
classes depend on generated dom classes. Definition at line 45 of file daeDocument.h.
const daeURI& daeDocument::getExtractedFileURI | ( | ) | [inline] |
If this document is the root of a ZAE archive, this method can be used to get the extracted file. Return value is only valid if isZAERootDocument() returns true.
Definition at line 127 of file daeDocument.h.
void daeDocument::insertElement | ( | daeElementRef | element | ) |
This function is used to track how a document gets modified. It gets called internally.
element | The element that was added to this document. |
bool daeDocument::isZAERootDocument | ( | ) | [inline] |
Returns true if this document is the root of a ZAE archive. In that case getExtractedFileURI() can be used to parse this document and for URI resolving.
Definition at line 119 of file daeDocument.h.
void daeDocument::removeElement | ( | daeElementRef | element | ) |
This function is used to track how a document gets modified. It gets called internally.
element | The element that was removed from this document. |
void daeDocument::setDomRoot | ( | daeElement * | domRoot | ) | [inline] |
Accessor to set the domCollada associated with this document
domRoot | the domCollada that is the root of this document |
Definition at line 51 of file daeDocument.h.
DAE* daeDocument::dae [private] |
The DAE that owns this document. The DAE's database is notified by the document when elements are inserted, removed, or have their ID changed.
Definition at line 134 of file daeDocument.h.
daeElementRef daeDocument::dom [private] |
Top Level element for of the document, always a domCollada
Definition at line 140 of file daeDocument.h.
daeURI daeDocument::mExtractedFileURI [private] |
URI pointing to the extracted root DAE if mZAERootDocument is true. Otherwise it is not valid.
Definition at line 157 of file daeDocument.h.
bool daeDocument::mZAERootDocument [private] |
Indicates if this document is the root of a ZAE archive.
Definition at line 151 of file daeDocument.h.
daeURI daeDocument::uri [private] |
The URI of the document, may be blank if the document wasn't loaded from a URI
Definition at line 146 of file daeDocument.h.