Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

AtomMap.h

Go to the documentation of this file.
00001 
00007 #ifndef ATOMMAP_H
00008 #define ATOMMAP_H
00009 
00010 #include "NamdTypes.h"
00011 
00012 enum { notUsed = -1 };
00013 
00014 class AtomMap
00015 {
00016 public:
00017   static AtomMap *Instance();
00018   inline static AtomMap *Object() {return CkpvAccess(AtomMap_instance);}
00019   ~AtomMap(void);
00020   void checkMap();
00021 
00022   void allocateMap(int nAtomIDs);
00023 
00024   int registerIDs(PatchID pid, const CompAtom *begin, const CompAtom *end);
00025   int unregisterIDs(PatchID pid, const CompAtom *begin, const CompAtom *end);
00026 
00027   LocalID localID(AtomID id);
00028 
00029   void clearMap(void);
00030   void print(void);
00031 
00032 
00033 protected:
00034   AtomMap(void);
00035 
00036 private:
00037 
00038   LocalID *localIDTable;
00039   int tableSz;
00040   bool cleared;
00041 
00042 };
00043 
00044 //----------------------------------------------------------------------
00045 // LocalID contains patch pid and local patch atom index
00046 // for a given global atom number
00047 inline LocalID AtomMap::localID(AtomID id)
00048 {
00049   return localIDTable[id];
00050 }
00051 
00052 #endif /* ATOMMAP_H */
00053 

Generated on Fri Jul 25 04:07:14 2008 for NAMD by  doxygen 1.3.9.1