Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

hk_importcsv Class Reference

imports comma delimited textfiles More...

#include <hk_importcsv.h>

Inheritance diagram for hk_importcsv:

hk_dsvisible hk_visible hk_class hk_kdecsvimportdialog List of all members.

Public Member Functions

 hk_importcsv (void)
virtual ~hk_importcsv (void)
bool execute (enum_interaction i=interactive)
void set_filedefinition (const hk_string &textdelimiter="\"", const hk_string &betweenfields=",", const hk_string &rowdelimiter="\n", const hk_string &datetimeformat="", const hk_string &dateformat="", const hk_string &timeformat="", const hk_string &charset="", const hk_string &locale="")
void set_filename (const hk_string &filename)
void set_firstrow_contains_fieldnames (bool f=true)
void set_append_rows (bool f=false)
void set_create_new_table (bool n=true)
void add_columnname (const hk_string &col)
void clear_columnlist (void)
void set_detect_autoinc (bool)
bool detect_autoinc (void) const
hk_string textdelimiter (void)
hk_string betweenfield (void)
hk_string rowdelimiter (void)
hk_string datetimeformat (void)
hk_string dateformat (void)
hk_string timeformat (void)
hk_string filelocale (void)
hk_string filecharset (void)
void set_overwrite_table (bool)
bool overwrite_table (void)
vector< hk_string > * create_valuelist (hk_string &row)
void get_line (ifstream &, hk_string &)

Protected Member Functions

void set_progressdialog (progress_dialogtype *progressdialog)
progress_dialogtypeprogressdialog (void) const
void set_columns (void)
void create_automatic_columns (void)
bool initialize_table (enum_interaction)
virtual bool before_columns_deleted (void)
virtual bool widget_specific_after_new_row (void)

Detailed Description

imports comma delimited textfiles

Version:
Revision
1.27
Author:
Horst Knorr (hk_classes@knoda.org)


Constructor & Destructor Documentation

hk_importcsv::hk_importcsv void   ) 
 

virtual hk_importcsv::~hk_importcsv void   )  [virtual]
 


Member Function Documentation

void hk_importcsv::add_columnname const hk_string col  ) 
 

Define the equivalent column names in an existing table. Column 1 of the CSV File will be added to the first column of the table.

virtual bool hk_importcsv::before_columns_deleted void   )  [protected, virtual]
 

FOR WIDGET DEVELOPERS ONLY: will be automatically called before the columns will be deleted. usually column pointers will be set to NULL in this function. i.e.when enabling,disabling or when a depending datasource has to requery its rows.

Reimplemented from hk_dsvisible.

hk_string hk_importcsv::betweenfield void   )  [inline]
 

void hk_importcsv::clear_columnlist void   ) 
 

void hk_importcsv::create_automatic_columns void   )  [protected]
 

vector<hk_string>* hk_importcsv::create_valuelist hk_string row  ) 
 

hk_string hk_importcsv::dateformat void   )  [inline]
 

Reimplemented from hk_visible.

hk_string hk_importcsv::datetimeformat void   )  [inline]
 

Reimplemented from hk_visible.

bool hk_importcsv::detect_autoinc void   )  const
 

bool hk_importcsv::execute enum_interaction  i = interactive  ) 
 

after setting all infos start the import with execut

Returns:
true if successful else false

hk_string hk_importcsv::filecharset void   )  [inline]
 

hk_string hk_importcsv::filelocale void   )  [inline]
 

void hk_importcsv::get_line ifstream &  ,
hk_string
 

bool hk_importcsv::initialize_table enum_interaction   )  [protected]
 

bool hk_importcsv::overwrite_table void   ) 
 

progress_dialogtype* hk_importcsv::progressdialog void   )  const [protected]
 

hk_string hk_importcsv::rowdelimiter void   )  [inline]
 

void hk_importcsv::set_append_rows bool  f = false  ) 
 

If user wants to append data, instead of creating a new table or overwriting an existing table. Default is false.

void hk_importcsv::set_columns void   )  [protected]
 

void hk_importcsv::set_create_new_table bool  n = true  ) 
 

If set to true a new table will be created else it will be appended to an existing table

void hk_importcsv::set_detect_autoinc bool   ) 
 

void hk_importcsv::set_filedefinition const hk_string textdelimiter = "\"",
const hk_string betweenfields = ",",
const hk_string rowdelimiter = "\n",
const hk_string datetimeformat = "",
const hk_string dateformat = "",
const hk_string timeformat = "",
const hk_string charset = "",
const hk_string locale = ""
 

defines the fielddelimiter and the columndelimiter of the csv-file.

void hk_importcsv::set_filename const hk_string filename  ) 
 

Name of the CSV-file

void hk_importcsv::set_firstrow_contains_fieldnames bool  f = true  ) 
 

If the first row in the CSV file contains set this function to true else false Default is true

void hk_importcsv::set_overwrite_table bool   ) 
 

void hk_importcsv::set_progressdialog progress_dialogtype progressdialog  )  [protected]
 

hk_string hk_importcsv::textdelimiter void   )  [inline]
 

hk_string hk_importcsv::timeformat void   )  [inline]
 

Reimplemented from hk_visible.

virtual bool hk_importcsv::widget_specific_after_new_row void   )  [protected, virtual]
 

If this function returns false the execution of the import will be cancelled

Reimplemented in hk_kdecsvimportdialog.


The documentation for this class was generated from the following file:
Generated on Thu Mar 9 18:40:41 2006 for hk_classes by  doxygen 1.4.1