daeLIBXMLPlugin Class Reference

#include <daeLIBXMLPlugin.h>

Inheritance diagram for daeLIBXMLPlugin:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 daeLIBXMLPlugin (DAE &dae)
virtual daeString getOption (daeString option)
virtual daeInt setOption (daeString option, daeString value)
virtual daeInt write (const daeURI &name, daeDocument *document, daeBool replace)
virtual ~daeLIBXMLPlugin ()

Private Member Functions

daeElementRef read (_xmlTextReader *reader)
daeElementRef readElement (_xmlTextReader *reader, daeElement *parentElement, int &readRetVal)
virtual daeElementRef readFromFile (const daeURI &uri)
virtual daeElementRef readFromMemory (daeString buffer, const daeURI &baseUri)
void writeAttribute (daeMetaAttribute *attr, daeElement *element)
void writeElement (daeElement *element)
void writeRawSource (daeElement *src)
void writeValue (daeElement *element)

Private Attributes

DAEdae
unsigned long rawByteCount
FILE * rawFile
daeURI rawRelPath
bool saveRawFile
_xmlTextWriter * writer

Detailed Description

The daeLIBXMLPlugin class derives from daeIOPluginCommon and implements an XML input/output backend using libxml2 as a parser. When using this plugin, DAE::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. DAE::saveAs will only handle a filename path at present (ie: no scheme or authority).

Definition at line 29 of file daeLIBXMLPlugin.h.


Constructor & Destructor Documentation

daeLIBXMLPlugin::daeLIBXMLPlugin ( DAE dae  ) 

Constructor.

virtual daeLIBXMLPlugin::~daeLIBXMLPlugin (  )  [virtual]

Destructor.


Member Function Documentation

virtual daeString daeLIBXMLPlugin::getOption ( daeString  option  )  [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.

Implements daeIOPlugin.

daeElementRef daeLIBXMLPlugin::read ( _xmlTextReader *  reader  )  [private]
daeElementRef daeLIBXMLPlugin::readElement ( _xmlTextReader *  reader,
daeElement parentElement,
int &  readRetVal 
) [private]
virtual daeElementRef daeLIBXMLPlugin::readFromFile ( const daeURI uri  )  [private, virtual]

Implements daeIOPluginCommon.

virtual daeElementRef daeLIBXMLPlugin::readFromMemory ( daeString  buffer,
const daeURI baseUri 
) [private, virtual]

Implements daeIOPluginCommon.

virtual daeInt daeLIBXMLPlugin::setOption ( daeString  option,
daeString  value 
) [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. daeLibXML2Plugin supports only one option, "saveRawBinary". Set to "true" to save float_array data as a .raw binary file. The daeRawResolver will convert the data back into COLLADA domFloat_array elements upon load.

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

Implements daeIOPlugin.

virtual daeInt daeLIBXMLPlugin::write ( const daeURI name,
daeDocument document,
daeBool  replace 
) [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()

Implements daeIOPlugin.

void daeLIBXMLPlugin::writeAttribute ( daeMetaAttribute attr,
daeElement element 
) [private]
void daeLIBXMLPlugin::writeElement ( daeElement element  )  [private]
void daeLIBXMLPlugin::writeRawSource ( daeElement src  )  [private]
void daeLIBXMLPlugin::writeValue ( daeElement element  )  [private]

Member Data Documentation

Definition at line 66 of file daeLIBXMLPlugin.h.

unsigned long daeLIBXMLPlugin::rawByteCount [private]

Definition at line 71 of file daeLIBXMLPlugin.h.

FILE* daeLIBXMLPlugin::rawFile [private]

Definition at line 70 of file daeLIBXMLPlugin.h.

Definition at line 72 of file daeLIBXMLPlugin.h.

Definition at line 73 of file daeLIBXMLPlugin.h.

_xmlTextWriter* daeLIBXMLPlugin::writer [private]

Definition at line 68 of file daeLIBXMLPlugin.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:14 2013