HomePatchList.h

Go to the documentation of this file.
00001 
00007 /*
00008    Helper class for PatchMgr to manager HomePatch(es)
00009    It is object contained in the container HomePatchList
00010 */
00011 
00012 #ifndef HOMEPATCHLIST_H
00013 #define HOMEPATCHLIST_H
00014 #include "NamdTypes.h"
00015 #include "SortedArray.h"
00016 #include "ResizeArrayIter.h"
00017 
00018 class HomePatch;
00019 
00020 class HomePatchElem {
00021 public:
00022   PatchID   pid;
00023   HomePatch *patch;
00024 
00025   int operator<(HomePatchElem e) { return (pid < e.pid); }
00026   int operator==(HomePatchElem e) { return (pid == e.pid); }
00027 
00028   HomePatchElem(PatchID id=-1, HomePatch *p=NULL) : pid(id), patch(p) {};
00029   ~HomePatchElem() { };
00030   HomePatchElem& operator=(const HomePatchElem &e) { 
00031     pid = e.pid; 
00032     patch = e.patch;  // Do not delete patch!  This op only used to shuffle
00033                       // we delete the patch here only when the HomePatch is 
00034                       // moved off!
00035     return(*this);
00036   };
00037 };
00038 
00039 typedef SortedArray<HomePatchElem> HomePatchList;
00040 typedef ResizeArrayIter<HomePatchElem> HomePatchListIter;
00041 
00042 #endif /* HOMEPATCHLIST_H */
00043 

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