COLLADA 1.4 DOM: daeLIBXMLPlugin Class Reference

COLLADA

daeLIBXMLPlugin Class Reference

#include <daeLIBXMLPlugin.h>

Inheritance diagram for daeLIBXMLPlugin:

Inheritance graph
[legend]
Collaboration diagram for daeLIBXMLPlugin:

Collaboration graph
[legend]
List of all members.

Detailed Description

The daeLIBXMLPlugin class derives from daeIOPlugin and implements an XML input/output backend using libxml2 as a parser.

When using this plugin, daeInterface::load() expects an rfc 2396 compliant URI, any URI supported by libxml2 should be properly handled including ones with network schemes and authority. If the URI contains a fragment it will be ignored and the entire referenced document will be loaded. daeInterface::saveAs will only handle a filename path at present (ie: no scheme or authority).

Public Member Functions

 daeLIBXMLPlugin ()
 Constructor.
virtual ~daeLIBXMLPlugin ()
 Destructor.
virtual daeInt setMeta (daeMetaElement *topMeta)
 Sets the top meta object.
virtual void setDatabase (daeDatabase *database)
 Sets the database to use.
virtual daeInt read (daeURI &uri, daeString docBuffer)
 Imports content into the database from an input.
virtual daeInt write (daeURI *name, daeCollection *collection, daeBool replace)
 Writes a specific collection to an output.
daeElementRef startParse (daeMetaElement *thisMetaElement, xmlTextReaderPtr reader)
daeElementRef nextElement (daeMetaElement *thisMetaElement, xmlTextReaderPtr reader)
virtual void getProgress (daeInt *bytesParsed, daeInt *lineNumber, daeInt *totalBytes, daeBool reset=false)
 Gets the progress of load() operation.

Member Function Documentation

void daeLIBXMLPlugin::getProgress daeInt *  bytesParsed,
daeInt *  lineNumber,
daeInt *  totalBytes,
daeBool  reset = false
[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.

Implements daeIOPlugin.

daeInt daeLIBXMLPlugin::read daeURI uri,
daeString  docBuffer
[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().

Implements daeIOPlugin.

void daeLIBXMLPlugin::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.

Parameters:
database Database to set.

Implements daeIOPlugin.

daeInt daeLIBXMLPlugin::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.

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.

Implements daeIOPlugin.

daeInt daeLIBXMLPlugin::write daeURI name,
daeCollection collection,
daeBool  replace
[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()

Implements daeIOPlugin.


The documentation for this class was generated from the following files:
  • C:/SVN_wf/COLLADA_DOM/include/modules/daeLIBXMLPlugin.h
  • C:/SVN_wf/COLLADA_DOM/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp

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