NAMD
HomePatchList.h
Go to the documentation of this file.
1 
7 /*
8  Helper class for PatchMgr to manager HomePatch(es)
9  It is object contained in the container HomePatchList
10 */
11 
12 #ifndef HOMEPATCHLIST_H
13 #define HOMEPATCHLIST_H
14 #include "NamdTypes.h"
15 #include "SortedArray.h"
16 #include "ResizeArrayIter.h"
17 
18 class HomePatch;
19 
21 public:
24 
25  int operator<(HomePatchElem e) { return (pid < e.pid); }
26  int operator==(HomePatchElem e) { return (pid == e.pid); }
27 
28  HomePatchElem(PatchID id=-1, HomePatch *p=NULL) : pid(id), patch(p) {};
31  pid = e.pid;
32  patch = e.patch; // Do not delete patch! This op only used to shuffle
33  // we delete the patch here only when the HomePatch is
34  // moved off!
35  return(*this);
36  };
37 };
38 
41 
42 #endif /* HOMEPATCHLIST_H */
43 
HomePatch * patch
Definition: HomePatchList.h:23
ResizeArrayIter< HomePatchElem > HomePatchListIter
Definition: HomePatchList.h:40
int operator==(HomePatchElem e)
Definition: HomePatchList.h:26
HomePatchElem & operator=(const HomePatchElem &e)
Definition: HomePatchList.h:30
int PatchID
Definition: NamdTypes.h:182
int operator<(HomePatchElem e)
Definition: HomePatchList.h:25
HomePatchElem(PatchID id=-1, HomePatch *p=NULL)
Definition: HomePatchList.h:28
SortedArray< HomePatchElem > HomePatchList
Definition: HomePatchList.h:39