Gnome::Gda::XmlStorage Class Reference

Base class which provides saving and loading using XML structures. More...

#include <xmlstorage.h>

Inheritance diagram for Gnome::Gda::XmlStorage:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~XmlStorage ()
GdaXmlStorage* gobj ()
 Provides access to the underlying C GObject.
const GdaXmlStorage* gobj () const
 Provides access to the underlying C GObject.
Glib::ustring get_xml_id () const
 Fetch the xml id string of the object, it's up to the caller to free the string.
xmlNodePtr save_to_xml (std::auto_ptr<Glib::Error>& error) const
 Creates a new xmlNodePtr structure and fills it with data representing the object given as argument.
bool load_from_xml (xmlNodePtr node, std::auto_ptr<Glib::Error>& error)
 Updates the object with data stored in the XML node.

Static Public Member Functions

static void add_interface (GType gtype_implementer)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gnome::Gda::XmlStoragewrap (GdaXmlStorage* object, bool take_copy=false)

Detailed Description

Base class which provides saving and loading using XML structures.

Any object which implements this interface can be streamed and restored to and from an XML file.


Constructor & Destructor Documentation

virtual Gnome::Gda::XmlStorage::~XmlStorage (  )  [virtual]


Member Function Documentation

static void Gnome::Gda::XmlStorage::add_interface ( GType  gtype_implementer  )  [static]

Glib::ustring Gnome::Gda::XmlStorage::get_xml_id (  )  const

Fetch the xml id string of the object, it's up to the caller to free the string.

Returns:
The xml id.

const GdaXmlStorage* Gnome::Gda::XmlStorage::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gnome::Gda::DictAggregate, Gnome::Gda::DictConstraint, Gnome::Gda::DictDatabase, Gnome::Gda::DictField, Gnome::Gda::DictTable, Gnome::Gda::DictType, Gnome::Gda::Query, Gnome::Gda::QueryCondition, Gnome::Gda::QueryFieldAll, Gnome::Gda::QueryFieldField, Gnome::Gda::QueryFieldValue, and Gnome::Gda::QueryTarget.

GdaXmlStorage* Gnome::Gda::XmlStorage::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gnome::Gda::DictAggregate, Gnome::Gda::DictConstraint, Gnome::Gda::DictDatabase, Gnome::Gda::DictField, Gnome::Gda::DictTable, Gnome::Gda::DictType, Gnome::Gda::Query, Gnome::Gda::QueryCondition, Gnome::Gda::QueryFieldAll, Gnome::Gda::QueryFieldField, Gnome::Gda::QueryFieldValue, and Gnome::Gda::QueryTarget.

bool Gnome::Gda::XmlStorage::load_from_xml ( xmlNodePtr  node,
std::auto_ptr< Glib::Error > &  error 
)

Updates the object with data stored in the XML node.

The object MUST already exist and be of the correct type before calling this function. This is a virtual function.

Parameters:
node An XML node from an XML structure.
error Location to store error, or 0.
Returns:
true if no error occurred.

xmlNodePtr Gnome::Gda::XmlStorage::save_to_xml ( std::auto_ptr< Glib::Error > &  error  )  const

Creates a new xmlNodePtr structure and fills it with data representing the object given as argument.

Parameters:
error Location to store error, or 0.
Returns:
The new XML node, or 0 if an error occurred.


Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::XmlStorage> wrap ( GdaXmlStorage *  object,
bool  take_copy = false 
) [related]

Parameters:
object The C instance
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated on Sat Feb 10 20:06:44 2007 for libgdamm by  doxygen 1.4.7