MXIMPObjectCollection Class Reference

class MXIMPObjectCollection : public MXIMPBase

Interface for object collection.

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

Object collection can contain multiple instancies from single MXIMPBase derived object type at time. Object collection supports also attaching name to contained objects to further identify objects.

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

~MXIMPObjectCollection()

~MXIMPObjectCollection ( ) [inline, virtual]

Public destructor. Objects can be deleted through this interface.

Member Functions Documentation

AddObjectL(MXIMPBase *)

void AddObjectL ( MXIMPBase * aObject ) [pure virtual]

Adds new object to the set, and assignes zero length name for it.

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

Parameters

MXIMPBase * aObject New object to add to set. Takes object ownership in success.

AddObjectWithNameL(MXIMPBase *, const TDesC8 &)

void AddObjectWithNameL ( MXIMPBase * aObject,
const TDesC8 & aName
) [pure virtual]

Adds new object to the set. Allows multiple instancies from object type.

leave
KErrNoMemory if failed to allocate memory.
leave
KErrArgument if NULL argument were provided.
leave
KErrBadName if object name does not conform required syntax.

Parameters

MXIMPBase * aObject New object to add to set. Takes object ownership in success. NULL value not allowed.
const TDesC8 & aName Name for the added object. Zero length descriptor or valid Symbian OS object name. I.e. asterisk, question mark and single colon characters ("*", "?", ":") are not allowed in the name.

GetByType(MXIMPBase *&, TInt32)

TBool GetByType ( MXIMPBase *& aObject,
TInt32 aInterfaceId
) [pure virtual]

Gets the object having given interface type, and removes object from the set and returns object ownership to caller. Searching is done from the beginning, i.e. least recently used order.

Searches objects having zero length name and return the oldest inserted object among of those.

Parameters

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

GetByTypeAndName(MXIMPBase *&, TInt32, const TDesC8 &)

TBool GetByTypeAndName ( MXIMPBase *& aObject,
TInt32 aInterfaceId,
const TDesC8 & aMatch
) [pure virtual]

Gets up the object having given interface type and matching name, and removes object from the set and returns object ownership to caller. Searching is done from the beginning, i.e. least recently used order.

Parameters

MXIMPBase *& aObject Object of given interface type or NULL if no object having given interface type is found. Object ownership is returned to caller.
TInt32 aInterfaceId The interface type of the object to be looked up.
const TDesC8 & aMatch The object name match pattern. Match pattern may contain question mark and asterisk characters ("?", "*") resepectively to match single or multiple characters. Names are folded in pattern matching.

LookupByType(const MXIMPBase *&, TInt32)

void LookupByType ( const MXIMPBase *& aObject,
TInt32 aInterfaceId
) const [pure virtual]

Looks up the object having given interface type and zero length name. Returns the first found object.

Parameters

const MXIMPBase *& aObject Object of given interface type and zero length name or NULL if no object having given interface type is found. On entry, contains the object from where to start the lookup or NULL if lookup should be started from beginning of the set. If object given in entry is not found from set, lookup is started from beginning of the set. On return, if an matching object is found, this is set to point to the found object, else NULL. Found object ownership is not returned to caller.
TInt32 aInterfaceId The interface type of the object to be looked up.

LookupByTypeAndName(const MXIMPBase *&, TInt32, const TDesC8 &)

void LookupByTypeAndName ( const MXIMPBase *& aObject,
TInt32 aInterfaceId,
const TDesC8 & aMatch
) const [pure virtual]

Looks up the object having given interface type and matching object name.

Parameters

const MXIMPBase *& aObject On entry, contains the object from where to start the lookup or NULL if lookup should be started from the beginning of the set. If object given in entry is not found from set, lookup is started from the beginning of the set. On return, if an matching object is found, this is set to point to the found object, else NULL. Found object ownership is not returned to caller.
TInt32 aInterfaceId The interface type of the object to be looked up.
const TDesC8 & aMatch The object name match pattern. Match pattern may contain question mark and asterisk characters ("?", "*") resepectively to match single or multiple characters. Object names are handled as folded in pattern matching.

Member Enumerations Documentation

Enum anonymous

Interface ID for the MXIMPObjectCollection .

Enumerators

KInterfaceId = XIMP_IF_ID_OBJECT_COLLECTION