FreeEnergyGroup.h

Go to the documentation of this file.
00001 
00007 //---------------------------------------------------------------
00008 // AGroup contains a (potentially long) list of integers
00009 // written by David Hurwitz, March to May 1998.
00010 //---------------------------------------------------------------
00011 #if !defined(GROUP_HPP)
00012   #define GROUP_HPP
00013 
00014 const int kGroupNumToStart = 16;    // to start, there's room for this num ints.
00015 const int kGroupMultiplier = 4;     // each time array size is exceeded,
00016                                     // its size is increased by this many times.
00017 
00018 class AGroup {
00019 private:
00020   int*  m_pInts;      // the list of integers
00021   int   m_NumInts;    // the number of integers in the list
00022   int   m_MaxNum;     // the maximum number of integers allowed in
00023                       // the list without allocating more memory
00024 
00025 public:
00026   AGroup();
00027   ~AGroup();
00028   void    Clear();
00029   void    Add(int AnInt);
00030   AGroup& operator= (AGroup& Group);
00031   int     operator[] (int Index);
00032   int     GetNumInGroup() { return(m_NumInts); }
00033   void    List(int NumToList=-1);
00034 };
00035 
00036 #endif
00037 

Generated on Mon Nov 20 01:17:12 2017 for NAMD by  doxygen 1.4.7