CObjectIx Class Reference
class CObjectIx : public CBase |
Generates handle numbers for reference counting objects.
This is referred to as an object index.
Adding a reference counting object to an object index is the way in which a unique handle number can be generated for that object. A handle number is the way in which an object, which is owned or managed by another thread or process can be identified.
CObject
Constructor & Destructor Documentation
CObjectIx()
IMPORT_C | CObjectIx | ( | ) | [protected] |
~CObjectIx()
Destructor.
Frees all resources owned by the object index, prior to its destruction. In particular, it calls Close() on all reference counting objects in the index.
CObject::Close
Member Functions Documentation
ActiveCount()
TInt
| ActiveCount | ( | ) | const [inline] |
Gets the current number of reference counting objects held by this object index.
AddL(CObject *)
Adds the specified reference counting object into this object index and returns the handle number that represents it.
Parameters
CObject * anObj | The reference counting object to be added to this object index. |
At(TInt, TInt)
Gets a pointer to the reference counting object with the specified handle number and matching unique ID.
Parameters
TInt aHandle | The handle number of the reference counting object. |
TInt aUniqueID | The unique ID. |
At(TInt)
Gets a pointer to the reference counting object with the specified handle number.
Parameters
TInt aHandle | The handle number of the reference counting object. |
At(const CObject *)
Constructs and returns the handle number representing the specified reference counting object within this object index.
Parameters
const CObject * anObject | The reference counting object. |
AtL(TInt, TInt)
Gets a pointer to the reference counting object with the specified handle number and matching unique ID.
-
leave
- KErrBadHandle if there is no matching object.
Parameters
TInt aHandle | The handle number of the reference counting object. |
TInt aUniqueID | The unique ID. |
AtL(TInt)
Gets a pointer to the reference counting object with the specified handle number.
-
leave
- KErrBadHandle if there is no matching object.
Parameters
TInt aHandle | The handle number of the reference counting object. |
Count(CObject *)
Gets the number of occurrences of the specified reference counting object within this object index.
Note that the same reference counting object can be added to an object index more than once.
Parameters
CObject * anObject | The reference counting object. |
Count()
TInt
| Count | ( | ) | const [inline] |
NewL()
Creates a new object index.
Remove(TInt)
IMPORT_C void | Remove | ( | TInt | aHandle | ) | |
Removes the reference counting object identified by handle number from this object index and closes it.
If the reference counting object cannot be closed, because CObjectIx::ENoClose is ORed into the handle number, then it is neither removed from the object index nor closed.
-
panic
- E32USER-CBase 37 if aHandle does not represent an object known to this object index.
Parameters
TInt aHandle | The handle number of the reference counting object to be removed and closed. |
UpdateState()
void | UpdateState | ( | ) | [private] |
operator[](TInt)
Gets a pointer to a reference counting object located at the specified offset within the object index.
-
panic
- E32USER-CBase 21 if the value of anIndex is negative or is greater than or equal to the total number of objects held by the index.
Parameters
TInt anIndex | The offset of the reference counting object within the object index. Offset is relative to zero. |
Member Enumerations Documentation
Enum anonymous
Enumerators
ENoClose = KHandleNoClose |
When ORd into the handle number, indicates that the reference counting object cannot be closed.
|
ELocalHandle = KHandleFlagLocal |
When ORed into the handle number, indicates that the handle is a local handle.
|
Member Data Documentation
TInt
iHighWaterMark
TInt
| iHighWaterMark | [private] |
TInt
iNextInstance
TInt
| iNextInstance | [private] |
TInt
iNumEntries
TInt
| iNumEntries | [private] |
TInt
iUpdateDisabled
TInt
| iUpdateDisabled | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.