MXIMPRestrictedObjectCollection Class Reference

class MXIMPRestrictedObjectCollection : public MXIMPBase

Interface for restricted object collection.

Object collection is a generic container, capable to contain MXIMPBase derived objects, implemented by the XIMP Framework.

Restricted object collection forces each contained object instance to be distinct interface type. I.e. at time there can be just single object instance of certain MXIMPBase derived type at the collection.

Object collection supports adding and getting objects, and looking up objects by their interface type. Object collection takes the ownership of added objects.

Since
S60 v3.2

Inherits from

Constructor & Destructor Documentation

~MXIMPRestrictedObjectCollection()

~MXIMPRestrictedObjectCollection()[inline, virtual]

Public destructor. Objects can be deleted through this interface.

Member Functions Documentation

AddOrReplaceTypeL(MXIMPBase *)

voidAddOrReplaceTypeL(MXIMPBase *aObject)[pure virtual]

Adds new object to the set. If there exists already a object in the set with equal interface type, existing object is deleted and replaced with new one.

leave
KErrNoMemory if failed to allocate memory.
leave
KErrArgument if NULL argument were provided.

Parameters

MXIMPBase * aObjectNew object to add to set. Takes object ownership in success.

GetByType(MXIMPBase *&, TInt32)

voidGetByType(MXIMPBase *&aObject,
TInt32aInterfaceId
)[pure virtual]

Gets the object having given interface type, and removes object from the set and returns object ownership to caller.

Parameters

MXIMPBase *& aObjectObject of given interface type or NULL if no object having given interface type is found. Object ownership is returned to caller.
TInt32 aInterfaceIdThe interface type of the object to be looked up.

LookupByType(const MXIMPBase *&, TInt32)

voidLookupByType(const MXIMPBase *&aObject,
TInt32aInterfaceId
)const [pure virtual]

Looks up the object having given interface type.

Parameters

const MXIMPBase *& aObjectObject of given interface type or NULL if no object having given interface type is found. Object ownership is not returned to caller.
TInt32 aInterfaceIdThe interface type of the object to be looked up.