00001 /* 00002 * Copyright 2006 Sony Computer Entertainment Inc. 00003 * 00004 * Licensed under the MIT Open Source License, for details please see license.txt or the website 00005 * http://www.opensource.org/licenses/mit-license.php 00006 * 00007 */ 00008 00009 #ifndef __DAE_DOCUMENT__ 00010 #define __DAE_DOCUMENT__ 00011 00012 #include <dae/daeTypes.h> 00013 #include <dae/daeElement.h> 00014 #include <dae/daeURI.h> 00015 #include <dae/daeStringRef.h> 00016 00017 class DAE; 00018 class daeDatabase; 00019 00023 class DLLSPEC daeDocument 00024 { 00025 public: 00032 daeDocument(DAE& dae, bool zaeRootDocument = false, const std::string& extractedFileURI = ""); 00033 00037 ~daeDocument(); 00038 00045 daeElement* getDomRoot() const {return(dom);} 00051 void setDomRoot(daeElement* domRoot) {dom = domRoot; domRoot->setDocument(this); } 00059 daeURI* getDocumentURI() {return (&uri);} 00060 00068 const daeURI* getDocumentURI() const {return (&uri);} 00069 00074 DAE* getDAE(); 00075 00080 daeDatabase* getDatabase(); 00081 00088 void insertElement( daeElementRef element ); 00095 void removeElement( daeElementRef element ); 00103 void changeElementID( daeElementRef element, daeString newID ); 00111 void changeElementSID( daeElementRef element, daeString newSID ); 00112 00119 bool isZAERootDocument() {return mZAERootDocument;} 00120 00127 const daeURI& getExtractedFileURI() {return mExtractedFileURI;} 00128 00129 private: 00134 DAE* dae; 00135 00140 daeElementRef dom; 00141 00146 daeURI uri; 00147 00151 bool mZAERootDocument; 00152 00157 daeURI mExtractedFileURI; 00158 }; 00159 00160 typedef daeDocument daeCollection; 00161 00162 #endif 00163