[glom] Some documentation.



commit 973f71f1ccbdcc0865039a88e1fdb341d0962814
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Feb 26 11:30:51 2011 +0100

    Some documentation.

 glom/import_csv/csv_parser.cc |    4 ++++
 glom/import_csv/csv_parser.h  |    8 ++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/glom/import_csv/csv_parser.cc b/glom/import_csv/csv_parser.cc
index 4f59304..f477bd1 100644
--- a/glom/import_csv/csv_parser.cc
+++ b/glom/import_csv/csv_parser.cc
@@ -73,6 +73,10 @@ void CsvParser::set_file_and_start_parsing(const std::string& file_uri)
   Glib::RefPtr<Gio::File> file = Gio::File::create_for_uri(file_uri);
 
   set_state(CsvParser::STATE_PARSING);
+  
+  //TODO Get a rough estimate of the number of rows (for showing progress),
+  //by counting the number of lines:
+  //guint lines_count = 0;
 
   // Query the display name of the file to set in the title:
   file->query_info_async(sigc::bind(sigc::mem_fun(*this, &CsvParser::on_file_query_info), file),
diff --git a/glom/import_csv/csv_parser.h b/glom/import_csv/csv_parser.h
index 45410fc..e81e347 100644
--- a/glom/import_csv/csv_parser.h
+++ b/glom/import_csv/csv_parser.h
@@ -145,6 +145,14 @@ public:
    */
   void set_encoding(const Glib::ustring& encoding_charset);
 
+  //TODO: Add  @result A rough estimate of the number of rows that will be parsed.
+  /** Open the file and start parsing the rows.
+   * signal_line_scanned() will then be emitted when a row has been parsed.
+   * signal_finished_parsing() will be emitted when there are no more rows to parse.
+   * signal_file_read_error() will be emitted if there is a problem while parsing.
+   *
+   * @param uri The URI of the file containing the CSV data to parse.
+   */
   void set_file_and_start_parsing(const std::string& uri);
 
 private:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]