ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/GenericData.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/GenericData.hpp (file contents):
Revision 837 by tim, Wed Oct 29 00:19:10 2003 UTC vs.
Revision 1126 by tim, Tue Apr 20 05:39:38 2004 UTC

# Line 10 | Line 10
10   #define ZCONSFILENAME_ID     "ZCONSFILENAME"
11   #define ZCONSTOL_ID              "ZCONSTOL"
12   #define ZCONSFORCEPOLICY_ID "ZCONSFORCEPOLICY"
13 + #define ZCONSGAP_ID "ZCONSGAP"
14 + #define ZCONSFIXTIME_ID "ZCONSFIXTIME"
15 + #define ZCONSUSINGSMD_ID "ZCONSUSINGSMD"
16  
17   #define CHIVALUE_ID "CHIVALUE"
18   #define INTEGRALOFCHIDT_ID "INTEGRALOFCHIDT"
# Line 35 | Line 38 | class GenericData
38   /** Something we can improve it here is to use template
39   **
40   */
41 +
42 + class IntData : public GenericData{
43 +
44 +  public:
45 +
46 +    double getData()         { return data; }
47 +    void setData(int rhs) { data = rhs;  }
48 +
49 +  protected:
50 +    int data;
51 + };
52 +
53   class DoubleData : public GenericData{
54  
55    public:
# Line 60 | Line 75 | struct ZConsParaItem {
75    bool havingZPos;
76    double zPos;
77    double kRatio;
78 +  bool havingCantVel;
79 +  double cantVel;
80   };
81  
82   class ZConsParaData : public GenericData{
# Line 96 | Line 113 | class DoubleArrayData : public GenericData{
113   protected:
114     vector<double> data;
115   };
116 +
117 + struct AtomInfo : public GenericData{
118 +  public:
119 +    string AtomType;
120 +    double pos[3];
121 +    double dipole[3];  
122 + };
123 +
124 + class AtomData : public GenericData{
125 +  public:
126 +    ~AtomData();
127 +    void addAtomInfo(AtomInfo* info) {data.push_back(info);}
128 +    void clearAllAtomInfo();
129 +    AtomInfo* beginAtomInfo(vector<AtomInfo*>::iterator& i){
130 +      i = data.begin();
131 +      return i != data.end()? *i : NULL;
132 +    }
133 +    AtomInfo* nextAtomInfo(vector<AtomInfo*>::iterator& i){
134 +      ++i;
135 +      return i != data.end()? *i: NULL;
136 +    }
137 +    vector<AtomInfo*> getData() {return data;}
138 +    int getSize() {return data.size();}
139 +  protected:
140 +    vector<AtomInfo*> data;
141 + };
142 +
143 +
144 +
145   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines