#include <datamodelimport.h>
Inheritance diagram for Gnome::Gda::DataModelImport:
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<DataModelImport> | create (const std::string& filename, bool random_access, const Glib::RefPtr<const ParameterList>& options) |
static Glib::RefPtr<DataModelImport> | create (const gchar* data, bool random_access, const Glib::RefPtr<const ParameterList>& options) |
static Glib::RefPtr<DataModelImport> | create (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::DataModelImport> | wrap (GdaDataModelImport* object, bool take_copy=false) |
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:
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] |
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
0
. const GdaDataModelImport* Gnome::Gda::DataModelImport::gobj | ( | ) | const [inline] |
GdaDataModelImport* Gnome::Gda::DataModelImport::gobj | ( | ) | [inline] |
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.
Glib::RefPtr<Gnome::Gda::DataModelImport> wrap | ( | GdaDataModelImport * | object, | |
bool | take_copy = false | |||
) | [related] |
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. |