class MCatalogsBase |
This interface provides functions for querying the interfaces that a class implements. Also, functions for reference counter are provided. The reference counter is used to keep track of the number of users of the implemented class.
Public Member Functions | |
---|---|
TInt | AddRef() |
T * | QueryInterfaceL() |
const T * | QueryInterfaceL() |
T * | QueryInterfaceLC() |
const T * | QueryInterfaceLC() |
TInt | Release() |
Protected Member Functions | |
---|---|
~MCatalogsBase() | |
const TAny * | QueryInterfaceL(TInt) |
Public Member Enumerations | |
---|---|
enum | anonymous { KInterfaceUid = ECatalogsBaseUid } |
~MCatalogsBase | ( | ) | [protected, inline, virtual] |
The destructor of an interface is set virtual to make sure that the destructors of derived classes are called appropriately when the object is destroyed.
Destructors for MCatalogsBase and all derived interfaces are defined as protected to prevent direct use of delete on interface pointers (Release() must be called instead of delete).
TInt | AddRef | ( | ) | const [pure virtual] |
Increments the reference counter.
QueryInterfaceL() already increases the value by one if interface check was successfull. This function may be used if user knows that the interface is used in multiple places and Release() is called accordingly.
T * | QueryInterfaceL | ( | ) | [inline] |
This function is used to test if this object contains an implementation of the interface of the given type.
If the object contains the interface, a pointer to it is returned, and the reference count is increased by one. Otherwise, NULL is returned.
This interface does not allow the user to delete object directly (destructor is protected). The destruction of this object should be done by calling Release-function.
const T * | QueryInterfaceL | ( | ) | const [inline] |
This is const version of QueryInterfaceL.
const TAny * | QueryInterfaceL | ( | TInt | aInterfaceType | ) | const [protected, pure virtual] |
QueryInterfaceL
This function is used to test if this object contains an implementation of the interface of the given type. If the object contains the interface, then the reference count is increased by one.
TInt aInterfaceType | TInt that specifies the interface that this object should implement. |
T * | QueryInterfaceLC | ( | ) | [inline] |
Like QueryInterfaceL, tries to retrieve an interface of specified type from the object. If the interface pointer is returned, it is appended to the cleanup stack, so that a following CleanupStack::PopAndDestroy() will call Release() on the interface pointer appropriately.
const T * | QueryInterfaceLC | ( | ) | const [inline] |
This is const version of QueryInterfaceLC.
TInt | Release | ( | ) | const [pure virtual] |
Releases a reference. Deletes the object if the reference count reaches 0. Notice that destructor is defined as protected. So, the object of this interface can be deleted using this function and only after reference count is zero.
KInterfaceUid defines the identifier for this interface. Child interfaces should define their own unique values for their KInterfaceUid.
KInterfaceUid = ECatalogsBaseUid |
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.