#include <rmRefArray.h>
Inheritance diagram for rmRefArray:
Public Methods | |
rmRefArray () | |
virtual | ~rmRefArray () |
virtual int | addElement (const T &aElement, unsigned long aID) |
add an element into the table. More... | |
virtual int | modifyElement (unsigned long aID, const T &aElement) |
modify an element in the table. More... | |
virtual int | removeElement (unsigned long aID) |
remove an element from the table. More... | |
virtual long | addRef (unsigned long aID) |
increment the refCnt. More... | |
virtual long | release (unsigned long aID) |
decrement the refCnt. More... |
the data type for this class must have an member called 'refcnt'. refcnt is a integer that records the number of time an element is being used by other elements. the idea is that if an element whose (refcnt > 0), then this element is 'read-only'. it can neither be modified, nor removed. The refCnt can still go up, or down, depending on how many other elements are currently referencing this particular element. The element is only changable when the refCnt is 0.
Definition at line 21 of file rmRefArray.h.
|
Definition at line 24 of file rmRefArray.h. |
|
Definition at line 25 of file rmRefArray.h. |
|
add an element into the table. Add an element into the table and set refCnt to 0.
Reimplemented from rmBaseArray. Definition at line 59 of file rmRefArray.h. References rmBaseArray::mElementArray, rmBaseArray::mMaxId, RMCLIENT_ERROR_BASE_ID, RMCLIENT_ERROR_BASE_INSERT, and RMCLIENT_SUCCESS. |
|
increment the refCnt. Increment the refCnt of an element whose (id == aID) by 1.
Reimplemented in rmGenericMonitorControl. Definition at line 152 of file rmRefArray.h. References ACTIVE, and rmBaseArray::findId. |
|
modify an element in the table. Modify an element in the table if refCnt is 0.
Reimplemented from rmBaseArray. Definition at line 94 of file rmRefArray.h. References rmBaseArray::findId, RMCLIENT_ERROR_CC_REFCNT, and RMCLIENT_SUCCESS. |
|
decrement the refCnt. Decrement the refCnt of an element whose (id == aID) by 1.
Definition at line 177 of file rmRefArray.h. References ACTIVE, and rmBaseArray::findId. |
|
remove an element from the table. Remove an element in the table if refCnt is 0.
Reimplemented from rmBaseArray. Reimplemented in eventQuery. Definition at line 124 of file rmRefArray.h. References rmBaseArray::findId, rmBaseArray::mElementArray, rmBaseArray::mPos, RMCLIENT_ERROR_CC_REFCNT, and RMCLIENT_SUCCESS. Referenced by rmGenericMonitorControl::removeElement, rmGenericMonitorConfig::removeElement, and eventQuery::removeElement. |