00001 #ifndef PROPERTY
00002 #define PROPERTY
00003
00004 #include <iostream>
00005 #include <string>
00006 #include <vector>
00007 #include <fstream>
00008 #include <ctype.h>
00009
00010 using namespace std;
00011
00015 #ifdef WIN32
00016 static const char* const PROPERTYFILENAME = "Property.txt";
00017 #endif
00018 #ifndef WIN32
00019 static const char* const PROPERTYFILENAME = CONFIGDIR"Property.txt";
00020 #endif
00021
00024
00025
00026
00027
00028
00029 class Property
00030 {
00031 public:
00032
00033
00034
00035 vector<char*> dataName;
00036 vector<char*> list;
00037
00038
00039
00040 ifstream ifile;
00041 ~Property();
00042
00043
00044
00045
00046 std::string filename;
00047
00048
00049
00050
00051 vector<char *>::iterator itFileName;
00052
00053
00054
00055
00056 int select;
00057
00058
00059
00060
00061 Property():x(0),y(0),z(0),grouped(true),logging(false),select(0) ,groupingCriteria(NULL),filename(PROPERTYFILENAME){};
00065 Property(const Property& prop){
00066 x = prop.x;
00067 y = prop.y;
00068 z = prop.z;
00069 grouped = prop.grouped;
00070 logging = prop.logging;
00071 select = prop.select;
00072 dataName = prop.dataName;
00073 list = prop.list;
00074 filename = prop.filename;
00075
00076 itFileName = prop.itFileName;
00077
00078 strcpy(groupingCriteria, prop.groupingCriteria);
00079 }
00080 Property& operator=(const Property& prop){
00081
00082 if(this != &prop){
00083 x = prop.x;
00084 y = prop.y;
00085 z = prop.z;
00086 grouped = prop.grouped;
00087 logging = prop.logging;
00088 select = prop.select;
00089 dataName = prop.dataName;
00090 list = prop.list;
00091 filename = prop.filename;
00092
00093 itFileName = prop.itFileName;
00094
00095 strcpy(groupingCriteria, prop.groupingCriteria);
00096 }
00097 return *this;
00098 }
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 int getDatafromFile(const std::string& confdir);
00113 int cutString(char* row);
00117 bool logging;
00121 bool grouped;
00127 int x;
00128 int y;
00129 int z;
00133 char* groupingCriteria;
00134
00135 };
00136
00137
00138 #endif