#include <universal_manager.h>
Inherits RefCounter.
Inheritance diagram for UniversalManager< T, ParrentClass >::ManagedItem:


Public Member Functions | |
| ManagedItem (std::string key, T *itemPtr) | |
| initializes this wrapper of T with key (unique name used for registration) and ptr to data | |
| virtual | ~ManagedItem () |
| operator T * (void) const | |
| reference access | |
| operator T & (void) const | |
| type-cast operator to type T | |
| std::string | getKey (void) |
| key used by manager | |
| T * | getPtr (void) |
| data pointer | |
| bool | isManaged (void) |
| managed-status of this item | |
| void | disableManaging () |
| disables managing of this item and becomes a "zombie" | |
Protected Member Functions | |
| virtual void | OnZeroRefCount () |
| sends the "ZeroRefCount-event" to the appropriate specialized manager | |
Private Attributes | |
| std::string | mRegKey |
| key used in registration (key) | |
| T * | mItemPtr |
| pointer to the managed item | |
| bool | mManaged |
| true = owned by manager, false = owned by itself | |
Definition at line 74 of file universal_manager.h.
|
||||||||||||||||
|
initializes this wrapper of T with key (unique name used for registration) and ptr to data Sets managed-state mManaged to true (manager is the owner of this instance). Definition at line 82 of file universal_manager.h. |
|
|||||||||
|
Definition at line 86 of file universal_manager.h. |
|
|||||||||
|
disables managing of this item and becomes a "zombie" If the item is managed, managing is disabled, content (internal data pointer mItemPtr ) is destroyed by the manager and set to null. Definition at line 127 of file universal_manager.h. References Singleton< ParrentClass >::getInstance(), UniversalManager< T, ParrentClass >::ManagedItem::getPtr(), UniversalManager< T, ParrentClass >::ManagedItem::isManaged(), UniversalManager< T, ParrentClass >::ManagedItem::mItemPtr, and UniversalManager< T, ParrentClass >::ManagedItem::mManaged. Here is the call graph for this function: ![]() |
|
||||||||||
|
key used by manager
Definition at line 104 of file universal_manager.h. References UniversalManager< T, ParrentClass >::ManagedItem::mRegKey. Referenced by UniversalManager< T, ParrentClass >::OnZeroRefCount(). |
|
||||||||||
|
data pointer
Definition at line 111 of file universal_manager.h. References UniversalManager< T, ParrentClass >::ManagedItem::mItemPtr. Referenced by UniversalManager< T, ParrentClass >::ManagedItem::disableManaging(). |
|
||||||||||
|
managed-status of this item
Definition at line 118 of file universal_manager.h. References UniversalManager< T, ParrentClass >::ManagedItem::mManaged. Referenced by UniversalManager< T, ParrentClass >::ManagedItem::disableManaging(), and UniversalManager< T, ParrentClass >::ManagedItem::OnZeroRefCount(). |
|
|||||||||
|
sends the "ZeroRefCount-event" to the appropriate specialized manager It redefines the behavior of RefCounter::OnZeroRefCount (parrent's ZeroRefCount-event handler). This redefined handler fires a new event for the appropriate UniversalManager (if it is managed) and gives a reference to itself to the manager. The concrete specialized manager is the one who knows what to do, when ZeroRefCount-event has occured. The specialized manager should do all the "destroy-actions" related to freeing the resources allocated with this managed item.
Reimplemented from RefCounter. Definition at line 153 of file universal_manager.h. References Singleton< ParrentClass >::getPtr(), RefCounter::isHeapAllocated(), and UniversalManager< T, ParrentClass >::ManagedItem::isManaged(). Here is the call graph for this function: ![]() |
|
||||||||||
|
type-cast operator to type T
Definition at line 97 of file universal_manager.h. References UniversalManager< T, ParrentClass >::ManagedItem::mItemPtr. |
|
||||||||||
|
reference access
Definition at line 91 of file universal_manager.h. References UniversalManager< T, ParrentClass >::ManagedItem::mItemPtr. |
|
|||||
|
pointer to the managed item
Definition at line 167 of file universal_manager.h. Referenced by UniversalManager< T, ParrentClass >::ManagedItem::disableManaging(), UniversalManager< T, ParrentClass >::ManagedItem::getPtr(), UniversalManager< T, ParrentClass >::ManagedItem::operator T &(), and UniversalManager< T, ParrentClass >::ManagedItem::operator T *(). |
|
|||||
|
true = owned by manager, false = owned by itself
Definition at line 168 of file universal_manager.h. Referenced by UniversalManager< T, ParrentClass >::ManagedItem::disableManaging(), and UniversalManager< T, ParrentClass >::ManagedItem::isManaged(). |
|
|||||
|
key used in registration (key)
Definition at line 166 of file universal_manager.h. Referenced by UniversalManager< T, ParrentClass >::ManagedItem::getKey(). |
1.4.5