#include <daeIOPluginCommon.h>
Public Member Functions | |
daeIOPluginCommon () | |
virtual daeInt | read (const daeURI &uri, daeString docBuffer) |
virtual void | setDatabase (daeDatabase *database) |
virtual daeInt | setMeta (daeMetaElement *topMeta) |
virtual | ~daeIOPluginCommon () |
Protected Types | |
typedef std::pair< daeString, daeString > | attrPair |
Protected Member Functions | |
daeElementRef | beginReadElement (daeElement *parentElement, daeString elementName, const std::vector< attrPair > &attributes, daeInt lineNumber) |
bool | readElementText (daeElement *element, daeString text, daeInt elementLineNumber) |
virtual daeElementRef | readFromFile (const daeURI &uri)=0 |
virtual daeElementRef | readFromMemory (daeString buffer, const daeURI &baseUri)=0 |
Protected Attributes | |
daeDatabase * | database |
Private Attributes | |
daeMetaElement * | topMeta |
The daeIOPluginCommon
class was created to serve as a base class for the common functionality between the daeLIBXMLPlugin and daeTinyXMLPlugin classes.
Definition at line 25 of file daeIOPluginCommon.h.
typedef std::pair<daeString, daeString> daeIOPluginCommon::attrPair [protected] |
Definition at line 52 of file daeIOPluginCommon.h.
daeIOPluginCommon::daeIOPluginCommon | ( | ) |
Constructor.
virtual daeIOPluginCommon::~daeIOPluginCommon | ( | ) | [virtual] |
Destructor.
daeElementRef daeIOPluginCommon::beginReadElement | ( | daeElement * | parentElement, | |
daeString | elementName, | |||
const std::vector< attrPair > & | attributes, | |||
daeInt | lineNumber | |||
) | [protected] |
Imports content into the database from an input. The input can be a file, a database or another runtime.
uri | the URI of the COLLADA document to load, not all plugins accept all types of URIs, check the documentation for the IO plugin you are using. | |
docBuffer | A string containing the text of the document to load. This is an optional attribute and should only be used if the document has already been loaded into memory. |
DAE::load()
. Implements daeIOPlugin.
bool daeIOPluginCommon::readElementText | ( | daeElement * | element, | |
daeString | text, | |||
daeInt | elementLineNumber | |||
) | [protected] |
virtual daeElementRef daeIOPluginCommon::readFromFile | ( | const daeURI & | uri | ) | [protected, pure virtual] |
Implemented in daeTinyXMLPlugin, and daeLIBXMLPlugin.
virtual daeElementRef daeIOPluginCommon::readFromMemory | ( | daeString | buffer, | |
const daeURI & | baseUri | |||
) | [protected, pure virtual] |
Implemented in daeTinyXMLPlugin, and daeLIBXMLPlugin.
virtual void daeIOPluginCommon::setDatabase | ( | daeDatabase * | database | ) | [virtual] |
Sets the database to use. All daeIOPlugins
use the same interface to the daeDatabase
, setDatabase()
tells the daeIOPlugin
which daeDatabase
object it should use for storage and queries.
database | Database to set. |
Implements daeIOPlugin.
virtual daeInt daeIOPluginCommon::setMeta | ( | daeMetaElement * | topMeta | ) | [virtual] |
Sets the top meta object. Called by dae::setIOPlugin()
when the IO plugin changes. It passes to this function the top meta object, which is the root of a hierarchy of daeMetaElement
objects. This top meta object is capable of creating any of the root objects in the DOM tree.
topMeta | Top meta object to use to create objects to fill the database. |
Implements daeIOPlugin.
daeDatabase* daeIOPluginCommon::database [protected] |
Definition at line 45 of file daeIOPluginCommon.h.
daeMetaElement* daeIOPluginCommon::topMeta [private] |
Definition at line 60 of file daeIOPluginCommon.h.