daeIOPlugin Class Reference

#include <daeIOPlugin.h>

Inheritance diagram for daeIOPlugin:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual daeString getOption (daeString option)=0
virtual const std::vector
< std::string > & 
getSupportedProtocols ()
virtual daeInt setMeta (daeMetaElement *topMeta)=0
virtual daeInt setOption (daeString option, daeString value)=0
virtual ~daeIOPlugin ()
Operations

virtual daeInt read (const daeURI &uri, daeString docBuffer)=0
virtual daeInt write (const daeURI &name, daeDocument *document, daeBool replace)=0
Database setup

virtual void setDatabase (daeDatabase *database)=0

Protected Attributes

std::vector< std::string > supportedProtocols

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.

Definition at line 25 of file daeIOPlugin.h.


Constructor & Destructor Documentation

virtual daeIOPlugin::~daeIOPlugin (  )  [inline, virtual]

Destructor

Definition at line 31 of file daeIOPlugin.h.


Member Function Documentation

virtual daeString daeIOPlugin::getOption ( daeString  option  )  [pure virtual]

getOption retrieves the value of an option from this IOPlugin. Which options a plugin supports is dependent on the plugin itself.

Parameters:
option The option to get.
Returns:
Returns the string value of the option or NULL if option is not valid.

Implemented in daeIOEmpty, daeTinyXMLPlugin, and daeLIBXMLPlugin.

virtual const std::vector<std::string>& daeIOPlugin::getSupportedProtocols (  )  [inline, virtual]

Returns a list of the URI protocols that this plugin supports.

Returns:
Returns a daeArray containing the supported protocols.

Definition at line 88 of file daeIOPlugin.h.

virtual daeInt daeIOPlugin::read ( const 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:
DAE::load().

Implemented in daeIOEmpty, and daeIOPluginCommon.

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 daeIOEmpty, and daeIOPluginCommon.

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 daeIOEmpty, and daeIOPluginCommon.

virtual daeInt daeIOPlugin::setOption ( daeString  option,
daeString  value 
) [pure virtual]

setOption allows you to set options for this IOPlugin. Which options a plugin supports is dependent on the plugin itself. There is currently no list of options that plugins are suggested to implement.

Parameters:
option The option to set.
value The value to set the option.
Returns:
Returns DAE_OK upon success.

Implemented in daeIOEmpty, daeTinyXMLPlugin, and daeLIBXMLPlugin.

virtual daeInt daeIOPlugin::write ( const daeURI name,
daeDocument document,
daeBool  replace 
) [pure virtual]

Writes a specific document to an output.

Parameters:
name URI to write the document to, not all IO plugins support all types of URIs check the documentation for the IO plugin you are using.
document Pointer to the document 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:
DAE::saveAs()

Implemented in daeIOEmpty, daeTinyXMLPlugin, and daeLIBXMLPlugin.


Member Data Documentation

std::vector<std::string> daeIOPlugin::supportedProtocols [protected]

Definition at line 113 of file daeIOPlugin.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


colladadom
Author(s): Du Hung Hou, Khronos.org, Marcus Barnes, Greg Corson, Herbert Law, Sebastian Schwarz, Steven Thomas, John Hsu (ros package), Tim Field (ros package)
autogenerated on Fri Jan 11 09:29:13 2013