Main Page | Class List | File List | Class Members | File Members

database.h

Go to the documentation of this file.
00001 00011 #ifndef DATABASE_H 00012 #define DATABASE_H 00013 00014 #ifdef WIN32 00015 //disable the (stupid) warning "identifier was truncated in debug information" 00016 // which happens because of the use of a map with two strings from the STL, which generates an identifier of more than 255 characters 00017 #pragma warning(disable:4786) 00018 #endif 00019 00020 #include <map> 00021 #include <fstream> 00022 #include "demo_header.h" 00023 00025 #define MAXLINESIZE 1000 00026 00029 #define CONTROL_CHAR '@' 00030 00031 #define KEY_CHAR '>' 00032 00033 #define COMMENT_CHAR '#' 00034 00036 typedef map<string, string> db_map_type ; 00037 typedef map<string, string>::value_type db_record; 00038 typedef map<string, string>::iterator db_iter; 00039 00043 class Database { 00044 public: 00045 Database(); 00046 00047 ~Database(); 00048 void Load(string filename); 00049 string Find(string key); 00050 void Clear(); 00051 void Insert(string key, string data); 00052 00053 protected: 00054 db_map_type DB_Map; 00055 }; 00056 00057 #endif

Generated on Thu Jun 16 15:47:18 for pc_demo.kdevelop by doxygen 1.3.8