#include <HxDataObjectManager.h>
Inheritance diagram for HxDataObjectManager::
Public Methods | |
virtual | ~HxDataObjectManager () |
virtual void | objectCreated (const PortableServer::ObjectId &oid)=0 |
Called when an object is created. More... | |
virtual void | objectAccessed (const PortableServer::ObjectId &oid)=0 |
Called before an operation is called in an object. More... | |
virtual void | objectUsed (const PortableServer::ObjectId &oid)=0 |
Called after an operation has been called in an object. More... | |
virtual void | objectDeleted (const PortableServer::ObjectId &oid)=0 |
Called when an object is deleted. More... | |
virtual void | setTotalLimit (HxString unit, int value)=0 |
Set limit on given unit. More... | |
virtual int | getTotalLimit (HxString unit)=0 |
virtual void | setObjectLimit (HxString unit, int value)=0 |
Set limit (per object) on given unit. More... | |
virtual int | getObjectLimit (HxString unit)=0 |
virtual int | getUsed (HxString unit)=0 |
virtual void | getUnitList (HxStringListBackInserter slPtr)=0 |
List unit names that this manager can handle. More... | |
Static Public Methods | |
void | init (const char *poaName) |
Call this function before ORB_init to initialize all the DataObjectManager mechanism. More... | |
HxDataObjectManager * | getDefault () |
Get default HxDataObjectManager. More... | |
HxDataObjectManager * | get (const char *name) |
Get manager for given object type. More... | |
void | getNameList (HxStringListBackInserter slPtr) |
Get list of types that have a specific HxDataObjectManager. More... | |
Static Protected Methods | |
void | put (HxDataObjectManager *mgr, const char *name) |
Each time an object is created, accessed or deleted, the manager responsible for that type of objects is called. When the number of existing objects exceeds the specified limit, the manager removes some objects in order to stay within the limits. Least recently used objects are removed first.
|
00049 { 00050 } |
|
Call this function before ORB_init to initialize all the DataObjectManager mechanism.
00054 { 00055 // Register the interceptor (through an ORB initializer) that will 00056 // call the DataObjectManagers 00057 PortableInterceptor::ORBInitializer_var initializer = 00058 new HxDataObjectInitializer(new HxDataObjectInterceptor(poaName)); 00059 PortableInterceptor::register_orb_initializer(initializer); 00060 00061 // Instantiate managers for specific types: 00062 static HxImageRepManager imageMgr; 00063 } |
|
Get default HxDataObjectManager.
00068 { 00069 return _default; 00070 } |
|
Get manager for given object type.
00074 { 00075 Map::const_iterator ptr; 00076 ptr = _map.find(HxString(name)); 00077 if(ptr == _map.end()) return _default; 00078 00079 return ptr->second; 00080 } |
|
Get list of types that have a specific HxDataObjectManager.
00090 { 00091 Map::const_iterator ptr; 00092 for(ptr = _map.begin(); ptr != _map.end(); ptr++) 00093 *slPtr++ = ptr->first; 00094 } |
|
Called when an object is created.
Reimplemented in HxDefaultDataObjectManager. |
|
Called before an operation is called in an object. (Manager marks object as used) Reimplemented in HxDefaultDataObjectManager. |
|
Called after an operation has been called in an object. (Check if object has grown). Reimplemented in HxDefaultDataObjectManager. |
|
Called when an object is deleted.
Reimplemented in HxDefaultDataObjectManager. |
|
Set limit on given unit. All objects together don't have to exceed that limit. Reimplemented in HxDefaultDataObjectManager, and HxImageRepManager. |
|
Reimplemented in HxDefaultDataObjectManager, and HxImageRepManager. |
|
Set limit (per object) on given unit. Any object can exceed that limit. Reimplemented in HxDefaultDataObjectManager, and HxImageRepManager. |
|
Reimplemented in HxDefaultDataObjectManager, and HxImageRepManager. |
|
Reimplemented in HxDefaultDataObjectManager, and HxImageRepManager. |
|
List unit names that this manager can handle.
Reimplemented in HxDefaultDataObjectManager, and HxImageRepManager. |
|
00084 { 00085 _map[HxString(name)] = mgr; 00086 } |