databases::XMLExport Class Reference

XML export interface. More...

#include <xml.h>

Inheritance diagram for databases::XMLExport:

modules::ErrorInterface modules::Interface List of all members.

Public Member Functions

virtual bool export_data (std::string const &dir, XMLIndex &index, std::string const &database="")=0
 Exports databases to XML files.

Static Public Attributes

static modules::PSIID const IID = 0x42e2ed91
 The interface identifier.

Detailed Description

This interface may be exposed by databases modules through the Module::factory() function to provide a mean for other modules, and the dbexport tool that may be provided with the program, to export all databases that were ever created, so that they can later be imported through the XMLImport interface.

The export_data() function must be overriden in derived classes.


Member Function Documentation

virtual bool databases::XMLExport::export_data ( std::string const &  dir,
XMLIndex index,
std::string const &  database = "" 
) [pure virtual]

Exports databases to XML files. The tags used in the XML files are currently undocumented, sorry... But it is very straightforward and examining XML files generated by some of the "standard" database modules will probably get you started without having to read the source code ;). The XMLWriter class may be used as a framework to make the task easier.

Parameters:
[in] dir The output directory for XML files. If it is an empty string, files must be output to current working directory
[in] index The index to which the files you create should be added to (you should check that a file hasn't been exported yet by looking for its presence in the index).
[in] database The name of a database to export. If it is an empty string (the default), then all databases must be exported.
Returns:
true if successful, false otherwise (in that case, error() should return an appropriate error string describing the error.)


The documentation for this class was generated from the following file:
Generated on Wed Aug 15 00:37:23 2007 for Epona API by  doxygen 1.5.2