ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new-templateless/OOPSE/libmdtools/GenericData.hpp
Revision: 851
Committed: Wed Nov 5 19:18:17 2003 UTC (20 years, 9 months ago) by mmeineke
File size: 2464 byte(s)
Log Message:
some work on trying to find the compression bug

File Contents

# Content
1 #ifndef __GENERICDATA_H__
2 #define __GENERICDATA_H__
3
4 #define ZCONSTIME_ID "ZCONSTIME"
5 #define ZCONSPARADATA_ID "ZCONSPARA"
6 #define ZCONSFILENAME_ID "ZCONSFILENAME"
7 #define ZCONSTOL_ID "ZCONSTOL"
8 #define ZCONSFORCEPOLICY_ID "ZCONSFORCEPOLICY"
9
10 #define CHIVALUE_ID "CHIVALUE"
11 #define INTEGRALOFCHIDT_ID "INTEGRALOFCHIDT"
12 #define ETAVALUE_ID "ETAVALUE"
13
14 #define GD_STRING_LENGTH 500
15
16 class GenericData
17 {
18 public:
19 GenericData();
20 GenericData(char* theID);
21 GenericData(char* theID, double theDval);
22 GenericData(char* theID, char* theCval);
23 GenericData(char* theID, double* theDarray, int theArrayLength);
24 virtual ~GenericData() {
25 if( next !=NULL ) delete next;
26 if( sameNext !=NULL ) delete sameNext;
27 if( dArray !=NULL ) delete dArray;
28 }
29
30 GenericData* add(char* theID);
31 GenericData* add(char* theID, double theDval);
32 GenericData* add(char* theID, char* theCval);
33 GenericData* add(char* theID, double* theDarray, int theArrayLength);
34
35 GenericData* getNext( void ) { return next; }
36 void setNext( GenericData* theNext ) { next = theNext; }
37
38 GenericData* getSameNext( void ) { return sameNext; }
39 void setSameNext( GenericData* theNext ) { sameNext = theNext; }
40
41 GenericData* find( char* theID );
42
43 void setValue(double theDval);
44 void setValue(char* theCval);
45 void setValue(double* theDarray, int theArrayLength);
46
47 char* getID() { return id; }
48 void setID(char* theID);
49
50 double getDval( void ) {return dVal;}
51 char* getCval( void ) { return cVal; }
52 int getDarray( double* &outArray );
53
54 protected:
55
56 char id[GD_STRING_LENGTH];
57 GenericData* next;
58 GenericData* sameNext;
59
60 double dVal;
61 double *dArray;
62 int arrayLength;
63 char cVal[GD_STRING_LENGTH];
64 };
65
66 // struct ZConsParaItem {
67 // int zconsIndex;
68 // bool havingZPos;
69 // double zPos;
70 // double kRatio;
71 // };
72
73 // class ZConsParaData : public GenericData{
74
75 // public:
76 // ZConsParaData();
77 // void addItem(ZConsParaItem& item) {data.push_back(item);}
78 // vector<ZConsParaItem>* getData() {return &data;}
79 // void setData(vector<ZConsParaItem>& theData) {data = theData;}
80 // void sortByIndex();
81 // bool isIndexUnique();
82
83 // private:
84 // vector<ZConsParaItem> data;
85 // };
86
87 // class ZConsParaSortCriterion{
88 // public:
89 // bool operator ()(const ZConsParaItem& item1, const ZConsParaItem& item2){
90 // return item1.zconsIndex < item2.zconsIndex;
91 // }
92
93 // };
94
95
96 #endif