Gnome::Gda::DataModelImport Class Reference
[Data Models]

Importing data from a string or a file. More...

#include <datamodelimport.h>

Inheritance diagram for Gnome::Gda::DataModelImport:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~DataModelImport ()
GdaDataModelImport* gobj ()
 Provides access to the underlying C GObject.
const GdaDataModelImport* gobj () const
 Provides access to the underlying C GObject.
GdaDataModelImport* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
GSList* get_errors ()
 Get the list of errors which model has to report.
void clean_errors ()
 Clears the history of errors model has to report.

Static Public Member Functions

static Glib::RefPtr<DataModelImportcreate (const std::string& filename, bool random_access, const Glib::RefPtr<const ParameterList>& options)
static Glib::RefPtr<DataModelImportcreate (const gchar* data, bool random_access, const Glib::RefPtr<const ParameterList>& options)
static Glib::RefPtr<DataModelImportcreate (xmlNodePtr node)

Protected Member Functions

 DataModelImport (const std::string& filename, bool random_access, const Glib::RefPtr<const ParameterList>& options)
 DataModelImport (const gchar* data, bool random_access, const Glib::RefPtr<const ParameterList>& options)
 DataModelImport (xmlNodePtr node)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gnome::Gda::DataModelImportwrap (GdaDataModelImport* object, bool take_copy=false)

Detailed Description

Importing data from a string or a file.

This data model imports data from a string or a file. The data can either be in a CSV (comma separated values) format or in an XML format as described by the libgda-array.dtd DTD (It is also possible to import data from an already-build XML tree validated against that DTD). The caller must decide, upon construction, if the new DataModelImport must support random access or simply cursor based access. Random access makes it easier to use the resulting data model but consumes more memory as all the data is copied in memory, and this is thus not suitable for large data sets. Note that importing from an already-built XML tree will always result in a random access data model.

Various import options can be specified using parameters in a ParameterList object. The available options depend on the format of the imported data listed here:


Constructor & Destructor Documentation

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

Gnome::Gda::DataModelImport::DataModelImport ( const std::string &  filename,
bool  random_access,
const Glib::RefPtr<const ParameterList>&  options 
) [protected]

Gnome::Gda::DataModelImport::DataModelImport ( const gchar *  data,
bool  random_access,
const Glib::RefPtr<const ParameterList>&  options 
) [protected]

Gnome::Gda::DataModelImport::DataModelImport ( xmlNodePtr  node  )  [explicit, protected]


Member Function Documentation

void Gnome::Gda::DataModelImport::clean_errors (  ) 

Clears the history of errors model has to report.

static Glib::RefPtr<DataModelImport> Gnome::Gda::DataModelImport::create ( xmlNodePtr  node  )  [static]

static Glib::RefPtr<DataModelImport> Gnome::Gda::DataModelImport::create ( const gchar *  data,
bool  random_access,
const Glib::RefPtr<const ParameterList>&  options 
) [static]

static Glib::RefPtr<DataModelImport> Gnome::Gda::DataModelImport::create ( const std::string &  filename,
bool  random_access,
const Glib::RefPtr<const ParameterList>&  options 
) [static]

GSList* Gnome::Gda::DataModelImport::get_errors (  ) 

Get the list of errors which model has to report.

The returned list is a list of G::Error structures, and must not be modified

Returns:
The list of errors (which must not be modified), or 0.

const GdaDataModelImport* Gnome::Gda::DataModelImport::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::DataModelRow.

GdaDataModelImport* Gnome::Gda::DataModelImport::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::DataModelRow.

GdaDataModelImport* Gnome::Gda::DataModelImport::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gnome::Gda::DataModelRow.


Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::DataModelImport> wrap ( GdaDataModelImport *  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:32 2007 for libgdamm by  doxygen 1.4.7