1 /* 2 * Copyright 2006 Sony Computer Entertainment Inc. 3 * 4 * Licensed under the MIT Open Source License, for details please see license.txt or the website 5 * http://www.opensource.org/licenses/mit-license.php 6 * 7 */ 8 9 #include <dae.h> 10 #include <dae/daeDocument.h> 11 #include <dae/daeDatabase.h> 12 13 14 daeDocument::daeDocument(DAE& dae, bool zaeRootDocument, const std::string& extractedFileURI) 15 : dae(&dae), uri(dae), mZAERootDocument(zaeRootDocument), mExtractedFileURI(dae, extractedFileURI) 16 { } 17 18 daeDocument::~daeDocument() { 19 } 20 21 void daeDocument::insertElement( daeElementRef element ) { 22 dae->getDatabase()->insertElement( this, element.cast() ); 23 } 24 25 void daeDocument::removeElement( daeElementRef element ) { 26 dae->getDatabase()->removeElement( this, element.cast() ); 27 } 28 29 void daeDocument::changeElementID( daeElementRef element, daeString newID ) { 30 dae->getDatabase()->changeElementID( element.cast(), newID ); 31 } 32 33 void daeDocument::changeElementSID( daeElementRef element, daeString newSID ) { 34 dae->getDatabase()->changeElementSID( element.cast(), newSID ); 35 } 36 37 DAE* daeDocument::getDAE() { 38 return dae; 39 } 40 41 daeDatabase* daeDocument::getDatabase() { 42 return dae->getDatabase(); 43 } 44