grid_processor.h

Go to the documentation of this file.
00001 #ifndef GRID_PROCESSOR_CLASS
00002 #define GRID_PROCESSOR_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : grid_processor                                                    *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2008-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "query_handler.h"
00019 
00020 // forward.
00021 class byte_filer;
00022 class float_array;
00023 class time_stamp;
00024 
00026 
00027 class DB_FREETDS_CLASS_STYLE grid_processor
00028 {
00029 public:
00030   grid_processor(query_handler &work_with);
00032 
00033   virtual ~grid_processor();
00034 
00035   IMPLEMENT_CLASS_NAME("grid_processor");
00036 
00037   void process_grid_files(const istring &grid_storage_folder,
00038           const istring &df_storage_dir,
00039           database_login_info &persistent_login_info);
00041 
00043   bool process_query_as_df(const istring &query, int data_source,
00044           const istring &df_storage_dir, const istring &key_column,
00045           const string_array &row_names, float_array &multipliers);
00047 
00049   void write_data_fields(int data_source, const istring &df_storage_dir,
00050           const istring &key_column, const string_array &row_names,
00051           float_array &multipliers);
00053 
00056   bool write_fields_for_row(byte_filer &df_file, int data_source,
00057           const istring &key_column, const string_array &row_names,
00058           float_array &multipliers, int_set &rows_seen);
00060 
00065   bool write_bogus_row(byte_filer &df_file, int data_source, int row_number);
00067 
00068   void reset_data_fields(const istring &df_storage_dir, int data_source);
00070 
00071 private:
00072   query_handler &_querier;  
00073   istring _last_grid_seen;  
00074   time_stamp *_startup_time;  
00075   bool _complain_on_missing_grid;  
00076 };
00077 
00078 #endif
00079 

Generated on Fri Nov 28 04:29:14 2008 for HOOPLE Libraries by  doxygen 1.5.1