|
UCommon
|
A typed template for using a key association with typed objects. More...
#include <memory.h>


Public Member Functions | |
| bool | assign (char *name, T *pointer) |
| Assign a name for a pointer to a typed object. | |
| assoc_pointer () | |
| Construct an associated pointer hash map based on the class template. | |
| bool | create (char *name, T *pointer) |
| Create a new name in the association table and assign typed object. | |
| unsigned | getCount (void) |
| Get the count of typed objects stored in our hash map. | |
| unsigned | getPages (void) |
| Access to number of pages allocated from heap for our associated index pointer. | |
| T * | locate (char *name) |
| Lookup a typed object by name. | |
| T * | operator() (char *name) |
| Reference a typed object directly by name. | |
| void | purge (void) |
| Purge the hash map of typed objects. | |
| void | remove (char *name) |
| Remove a name and typed pointer association. | |
| unsigned | utilization (void) |
| Access to pager utilization stats. | |
Additional Inherited Members | |
Private Member Functions inherited from ucommon::keyassoc | |
| bool | assign (char *name, void *pointer) |
| Assign a name to a data pointer. | |
| bool | create (char *name, void *pointer) |
| Create a new name in the association table and assign it's value. | |
| keyassoc (unsigned indexing=177, size_t max=0, size_t page=0) | |
| Create a key associated memory pointer table. | |
| ~keyassoc () | |
| Destroy association object. | |
A typed template for using a key association with typed objects.
This essentially forms a form of "smart pointer" that is a reference to specific typed objects by symbolic name. This is commonly used as for associated indexing of typed objects.
|
inline |
Assign a name for a pointer to a typed object.
If the name exists, it is re-assigned with the new pointer value, otherwise it is created.
| name | to assign. |
| pointer | of typed object to assign with name. |
|
inline |
|
inline |
Get the count of typed objects stored in our hash map.
Reimplemented from ucommon::keyassoc.
|
inline |
Access to number of pages allocated from heap for our associated index pointer.
This is needed because we inherit keyassoc privately.
Reimplemented from ucommon::memalloc.
|
inline |
Lookup a typed object by name.
| name | of typed object to locate. |
Reimplemented from ucommon::keyassoc.
|
inline |
Reference a typed object directly by name.
| name | of typed object to locate. |
Reimplemented from ucommon::keyassoc.
|
inline |
Remove a name and typed pointer association.
If managed key names are used then the memory allocated for the name will be re-used.
| name | to remove. |
Reimplemented from ucommon::keyassoc.
Definition at line 766 of file memory.h.

|
inline |
Access to pager utilization stats.
This is needed because we inherit keyassoc privately.
Reimplemented from ucommon::mempager.
1.8.1.1