00001 #ifndef GRID_PROCESSOR_CLASS
00002 #define GRID_PROCESSOR_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "query_handler.h"
00019
00020
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