#include <OwnerBox.h>
Public Member Functions | |
| OwnerBox (Owner *o, void(Owner::*fn)()) | |
| ~OwnerBox (void) | |
| void | open (Data *d) |
| void | close (void) |
| Box< Owner, Data > * | checkOut (void) |
| void | checkIn (Box< Owner, Data > *box) |
| int | isOpen () |
Friends | |
| class | Box<Owner,Data> |
|
||||||||||||||||
|
Definition at line 20 of file OwnerBox.h. 00020 :
00021 owner(o), callback(fn), data(0),
00022 numberUsers(0), openCount(0), closeCount(0) {};
|
|
||||||||||
|
Definition at line 24 of file OwnerBox.h. 00024 {
00025 if (numberUsers) {
00026 CkPrintf("OwnerBox::~OwnerBox() - still have boxes out there!\n");
00027 }
00028 }
|
|
||||||||||
|
Definition at line 63 of file OwnerBox.h. Referenced by Patch::unregisterAvgPositionPickup(), Patch::unregisterForceDeposit(), Patch::unregisterPositionPickup(), and HomePatch::unregisterProxy(). 00063 {
00064 delete box;
00065 if (closeCount != numberUsers || openCount != numberUsers) {
00066 CkPrintf("OwnerBox::checkIn() Tried to checkIn while in use\n");
00067 }
00068 if ( ! numberUsers-- ) {
00069 CkPrintf("OwnerBox::checkIn() - no registrants remaining\n");
00070 numberUsers = 0;
00071 } else {
00072 closeCount--; openCount--;
00073 }
00074 }
|
|
||||||||||
|
Definition at line 54 of file OwnerBox.h. Referenced by Patch::registerAvgPositionPickup(), Patch::registerForceDeposit(), Patch::registerPositionPickup(), and HomePatch::registerProxy(). 00054 {
00055 if (closeCount != numberUsers || openCount != numberUsers) {
00056 CkPrintf("OwnerBox::checkOut() Tried to checkOut while in use\n");
00057 }
00058 ++numberUsers; ++closeCount; ++openCount;
00059 return (new Box<Owner,Data>(this));
00060 }
|
|
||||||||||
|
Definition at line 77 of file OwnerBox.h. Referenced by Box< Patch, CompAtom >::close(). 00077 {
00078 if (!closeCount && !openCount) {
00079 data = 0; closeCount = openCount = numberUsers;
00080 (owner->*callback)();
00081 } else {
00082 CkPrintf("OwnerBox::close() - close called, but \
00083 closeCount %d openCount %d\n", closeCount, openCount);
00084 }
00085 }
|
|
|||||||||
|
Definition at line 42 of file OwnerBox.h. 00042 {
00043 return (closeCount != numberUsers || openCount != numberUsers);
00044 }
|
|
||||||||||
|
Definition at line 30 of file OwnerBox.h. Referenced by Patch::positionsReady(). 00030 {
00031 closeCount = openCount = numberUsers;
00032 data = d;
00033 if ( ! closeCount ) close();
00034 }
|
|
|||||
|
Definition at line 16 of file OwnerBox.h. |
1.3.9.1