#include <OwnerBox.h>
Public Member Functions | |
| OwnerBox (Owner *o, void(Owner::*fn)()) | |
| OwnerBox (Owner *o, void(Owner::*fn)(), int id, int tp) | |
| ~OwnerBox (void) | |
| void | open (Data *d) |
| void | close (void) |
| Box< Owner, Data > * | checkOut (int id) |
| void | checkIn (Box< Owner, Data > *box) |
| int | isOpen () |
| void | clientAdd () |
| void | clientRemove () |
| Data * | clientOpen (int count=1) |
| void | clientClose (int count=1) |
Friends | |
| class | Box<Owner,Data> |
|
||||||||||||||||
|
Definition at line 22 of file OwnerBox.h. 00022 :
00023 bid(-1), type(-1),
00024 owner(o), callback(fn), data(0),
00025 numberUsers(0), openCount(0), closeCount(0) {};
|
|
||||||||||||||||||||||||
|
Definition at line 27 of file OwnerBox.h. 00027 :
00028 bid(id), type(tp),
00029 owner(o), callback(fn), data(0),
00030 numberUsers(0), openCount(0), closeCount(0) {};
|
|
||||||||||
|
Definition at line 33 of file OwnerBox.h. 00033 {
00034 if (numberUsers) {
00035 CkPrintf("OwnerBox::~OwnerBox() - still have boxes out there!\n");
00036 }
00037 }
|
|
||||||||||
|
Definition at line 101 of file OwnerBox.h. References OwnerBox< Owner, Data >::clientRemove(). Referenced by Patch::unregisterAvgPositionPickup(), Patch::unregisterBornRadPickup(), Patch::unregisterDEdaSumDeposit(), Patch::unregisterDHdrPrefixPickup(), Patch::unregisterForceDeposit(), Patch::unregisterIntRadPickup(), Patch::unregisterLcpoTypePickup(), Patch::unregisterPositionPickup(), Patch::unregisterPsiSumDeposit(), and Patch::unregisterVelocityPickup(). 00101 {
00102 delete box;
00103 clientRemove();
00104 }
|
|
||||||||||
|
Definition at line 82 of file OwnerBox.h. References OwnerBox< Owner, Data >::clientAdd(). Referenced by Patch::registerAvgPositionPickup(), Patch::registerBornRadPickup(), Patch::registerDEdaSumDeposit(), Patch::registerDHdrPrefixPickup(), Patch::registerForceDeposit(), Patch::registerIntRadPickup(), Patch::registerLcpoTypePickup(), Patch::registerPositionPickup(), Patch::registerPsiSumDeposit(), and Patch::registerVelocityPickup(). 00082 {
00083 clientAdd();
00084 return (new Box<Owner,Data>(this,id));
00085 }
|
|
|||||||||
|
Definition at line 74 of file OwnerBox.h. Referenced by OwnerBox< Owner, Data >::checkOut(), and HomePatch::registerProxy(). 00074 {
00075 if (closeCount != numberUsers || openCount != numberUsers) {
00076 CkPrintf("OwnerBox::clientAdd() while in use\n");
00077 }
00078 ++numberUsers; ++closeCount; ++openCount;
00079 }
|
|
||||||||||
|
Definition at line 62 of file OwnerBox.h. Referenced by HomePatch::receiveResults(). 00062 {
00063 if ( ! (closeCount -= count) ) close();
00064 }
|
|
||||||||||
|
Definition at line 58 of file OwnerBox.h. Referenced by HomePatch::receiveResults(). 00058 {
00059 openCount -= count;
00060 return data;
00061 }
|
|
|||||||||
|
Definition at line 88 of file OwnerBox.h. Referenced by OwnerBox< Owner, Data >::checkIn(), and HomePatch::unregisterProxy(). 00088 {
00089 if (closeCount != numberUsers || openCount != numberUsers) {
00090 CkPrintf("OwnerBox::clientRemove() while in use\n");
00091 }
00092 if ( ! numberUsers-- ) {
00093 CkPrintf("OwnerBox::clientRemove() - no registrants remaining\n");
00094 numberUsers = 0;
00095 } else {
00096 closeCount--; openCount--;
00097 }
00098 }
|
|
||||||||||
|
Definition at line 107 of file OwnerBox.h. Referenced by Box< Patch, CompAtom >::close(), and Box< Patch, CompAtom >::skip(). 00107 {
00108 if (!closeCount && !openCount) {
00109 data = 0; closeCount = openCount = numberUsers;
00110 (owner->*callback)();
00111 } else {
00112 CkPrintf("OwnerBox::close() - close called, but closeCount %d openCount %d\n", closeCount, openCount);
00113 }
00114 }
|
|
|||||||||
|
Definition at line 51 of file OwnerBox.h. Referenced by HomePatch::boxClosed(). 00051 {
00052 return (closeCount != numberUsers || openCount != numberUsers);
00053 }
|
|
||||||||||
|
Definition at line 39 of file OwnerBox.h. Referenced by Patch::positionsReady(). 00039 {
00040 closeCount = openCount = numberUsers;
00041 data = d;
00042 if ( ! closeCount ) close();
00043 }
|
|
|||||
|
Definition at line 16 of file OwnerBox.h. |
1.3.9.1