COLLADA 1.4 DOM: daeIOPlugin Class Reference

COLLADA

daeIOPlugin Class Reference

#include <daeIOPlugin.h>

Inheritance diagram for daeIOPlugin:

Inheritance graph
[legend]
List of all members.

Detailed Description

The daeIOPlugin class provides the input/output plugin interface, which is the interface between the COLLADA runtime and the backend storage.

A native COLLADA XML plugin implementation is provided along with this interface.

Public Member Functions

virtual ~daeIOPlugin ()
 Destructor.
virtual daeInt setMeta (daeMetaElement *topMeta)=0
 Sets the top meta object.
Database setup
virtual void setDatabase (daeDatabase *database)=0
 Sets the database to use.
Operations
virtual daeInt read (daeURI &uri, daeString docBuffer)=0
 Imports content into the database from an input.
Operations
virtual daeInt write (daeURI *name, daeCollection *collection, daeBool replace)=0
 Writes a specific collection to an output.
Load/Save Progress
virtual void getProgress (daeInt *bytesParsed, daeInt *lineNumber, daeInt *totalBytes, daeBool reset=false)=0
 Gets the progress of load() operation.

Member Function Documentation

virtual void daeIOPlugin::getProgress daeInt *  bytesParsed,
daeInt *  lineNumber,
daeInt *  totalBytes,
daeBool  reset = false
[pure virtual]
 

Gets the progress of load() operation.

This function can be used from another thread to check the progress of a load() operation. The user can update a progress bar bytesParsed/totalBytes gives the percentage of progress of the operation.

Parameters:
bytesParsed Pointer to an integer that receives the number of bytes already consumed from the file, can be NULL if the user don't want to retrieve this information.
lineNumber Pointer to an integer that receives the number of lines read so far, can be NULL.
totalBytes Pointer to an integer that receives the total number of bytes in the file currently beeing loaded, can be NULL.
reset Indicates whether to reset the counters. A value of false is the default behaviour that fits most usage. Set it to true to reset the bytesParsed and lineNumber counters. The system resets the counter at the beginning of each file.

Implemented in daebXCePlugin, and daeLIBXMLPlugin.

virtual daeInt daeIOPlugin::read daeURI uri,
daeString  docBuffer
[pure virtual]
 

Imports content into the database from an input.

The input can be a file, a database or another runtime.

Parameters:
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.
Returns:
Returns DAE_OK if successfully loaded, otherwise returns a negative value defined in daeError.h.
See also:
daeInterface::load().

Implemented in daebXCePlugin, and daeLIBXMLPlugin.

virtual void daeIOPlugin::setDatabase daeDatabase database  )  [pure 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.

Parameters:
database Database to set.

Implemented in daebXCePlugin, and daeLIBXMLPlugin.

virtual daeInt daeIOPlugin::setMeta daeMetaElement topMeta  )  [pure 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.

Parameters:
topMeta Top meta object to use to create objects to fill the database.
Returns:
Returns DAE_OK if successful, otherwise returns a negative value defined in daeError.h.

Implemented in daebXCePlugin, and daeLIBXMLPlugin.

virtual daeInt daeIOPlugin::write daeURI name,
daeCollection collection,
daeBool  replace
[pure virtual]
 

Writes a specific collection to an output.

Parameters:
name URI to write the collection to, not all IO plugins support all types of URIs check the documentation for the IO plugin you are using.
collection Pointer to the collection that we're going to write out.
replace True if write should overwrite an existing file. False otherwise.
Returns:
Returns DAE_OK if success, a negative value defined in daeError.h otherwise.
See also:
daeInterface::saveAS()

Implemented in daebXCePlugin, and daeLIBXMLPlugin.


The documentation for this class was generated from the following file:
  • C:/SVN_wf/COLLADA_DOM/include/dae/daeIOPlugin.h

©2005 Sony Computer Entertainment Inc.. All Rights Reserved.
Generated on Fri Feb 10 16:47:00 2006 for COLLADA 1.4 DOM by doxygen 1.4.3