00001 #ifndef PARSE_CONF_FILE_H 00002 #define PARSE_CONF_FILE_H 00003 00004 #include "globals.h" 00005 #include <stdlib.h> 00006 #include <string.h> 00007 00008 char* retrieve_hazy_conf_file_path(); 00009 char* retrieve_hazy_dirs_path(); 00010 00011 #ifdef __cplusplus 00012 #include <string> 00013 #include <iostream> 00014 #include <sstream> 00015 #include <fstream> 00016 #include "hazy_model.h" 00017 00018 #define SUCCESSFUL_PARSE 0 00019 #define POSTGRES_PATH_PARSE_PROBLEM -1 00020 #define DBNAME_PARSE_PROBLEM -2 00021 #define SM_PARSE_PROBLEM -3 00022 #define USEEPS_PARSE_PROBLEM -4 00023 #define HAZY_ST_PARSE_PROBLEM -5 00024 #define RESERVOIR_SIZE_PARSE_PROBLEM -6 00025 #define BUFFER_SIZE_PARSE_PROBLEM -7 00026 #define FILE_NOT_FOUND -8 00027 #define POSTGRES_LINE_NOT_FOUND -9 00028 #define DBNAME_LINE_NOT_FOUND -10 00029 #define SM_PARSE_LINE_NOT_FOUND -11 00030 #define USEEPS_LINE_NOT_FOUND -12 00031 #define HAZY_ST_LINE_NOT_FOUND -13 00032 #define RESERVOIR_LINE_NOT_FOUND -14 00033 #define BUFFER_SIZE_LINE_NOT_FOUND -15 00034 00035 int parse_dbname_from_conf_file(std::string conf_file_path, std::string &db_name); 00036 int parse_postgres_path_from_conf_file(std::string conf_file_path, std::string &postgres_path); 00037 int parse_hazy_settings(std::string conf_file_path, enum storage_manager_type &sm, int &useepsmap, 00038 hazy_model::strategy &hazy_strategy, int &reservoir_size, int &buffer_size); 00039 void handle_success_code(int parse_success_code); 00040 00041 #endif 00042 00043 #endif