#include <mxmSmartHandleCore.h>
Inheritance diagram for mxmSmartHandleCore:
Public Member Functions | |
bool | operator! (void) const |
[Not synchronized] To provide typesafe and syntactically acceptable way of testing for (non-) null -ness. | |
bool | null (void) const |
[Not synchronized] Returns true if handle is null -handle, and false otherwise. | |
int | groupSize () const |
[Synchronized] Returns the number of handles in the smart pointer group the handle is member of. | |
void | setLock (mxmLockInterface *lock, bool assume_ownership=false) |
[Not synchronized] This method sets up the synchronization mechanism to be used to protect the emerging handle group's collective datastructure. | |
bool | releaseSmartlyHandledObject (void) |
[Synchronized] Releases control over potential handlee and becomes a null -handle again. | |
Private Member Functions | |
mxmSmartHandleCore () | |
Initializes to default state: null -handle, no lock. | |
void | init () |
[Not synchronized] Helper. | |
virtual void | deleteHandlee ()=0 |
[Not synchronized] Helper, to be implemented by subclasses. | |
void | reset () |
[Synchronized] Helper, leaves potential group and returns to default state: null -handle without any lock attached. | |
void | joinGroup (const mxmSmartHandleCore &other, void *handlee_override=0, bool lock_already_acquired=false) |
[Synchronized, via target group's lock!] Helper, makes default-state handle join the specified target group. | |
Private Attributes | |
mxmSmartHandleCore * | Prev |
mxmSmartHandleCore * | Next |
void * | Handlee |
mxmLockInterface * | Lock |
mxm::u32 | OwnedLock:1 |
mxm::u32 | Reserved:31 |
Friends | |
class | mxm::smart |
[khe]
Kai Hergenroether
|
[Synchronized, via target group's lock!] Helper, makes default-state handle join the specified target group.
Must only be invoked on a handle in default state:
If the handle
Copies dumb handlee pointer and locking semantics from |
|
[Synchronized] Releases control over potential handlee and becomes a Ownership over the handlee object is transferred back to the calling context.
|
|
[Not synchronized] This method sets up the synchronization mechanism to be used to protect the emerging handle group's collective datastructure. This method can only be invoked on a smart handle that
Failure to honor the above requirements is considered a programmer's screw-up, and is swiftly and decisively responded to with a call to mxm::terminal().
|