NAMD
FreeEnergyGroup.h
Go to the documentation of this file.
1 
7 //---------------------------------------------------------------
8 // AGroup contains a (potentially long) list of integers
9 // written by David Hurwitz, March to May 1998.
10 //---------------------------------------------------------------
11 #if !defined(GROUP_HPP)
12  #define GROUP_HPP
13 
14 const int kGroupNumToStart = 16; // to start, there's room for this num ints.
15 const int kGroupMultiplier = 4; // each time array size is exceeded,
16  // its size is increased by this many times.
17 
18 class AGroup {
19 private:
20  int* m_pInts; // the list of integers
21  int m_NumInts; // the number of integers in the list
22  int m_MaxNum; // the maximum number of integers allowed in
23  // the list without allocating more memory
24 
25 public:
26  AGroup();
27  ~AGroup();
28  void Clear();
29  void Add(int AnInt);
30  AGroup& operator= (AGroup& Group);
31  int operator[] (int Index);
32  int GetNumInGroup() { return(m_NumInts); }
33  void List(int NumToList=-1);
34 };
35 
36 #endif
37 
const int kGroupMultiplier
int GetNumInGroup()
int operator[](int Index)
int Index
Definition: structures.h:26
const int kGroupNumToStart
void Clear()
AGroup & operator=(AGroup &Group)
void List(int NumToList=-1)
void Add(int AnInt)