CMMFObjectContainer Class Reference

class CMMFObjectContainer : public CBase

Container class to hold the CMMFObject-derived objects in the controller framework.

Since
7.0s

Inherits from

Constructor & Destructor Documentation

CMMFObjectContainer()

IMPORT_C CMMFObjectContainer ( )

Constructor.

Since
7.0s

~CMMFObjectContainer()

IMPORT_C ~CMMFObjectContainer ( )

Destructor.

Deletes all objects owned by the container.

Since
7.0s

Member Functions Documentation

AddMMFObject(CMMFObject &)

IMPORT_C TInt AddMMFObject ( CMMFObject & aObject )

Add an object to the container.

Once the object has been added, its ownership is transferred to the container.

Since
7.0s

Parameters

CMMFObject & aObject A reference to the object to be added to the container.

DeleteAllObjects()

IMPORT_C void DeleteAllObjects ( )

Removes and destroys all objects from the container.

Since
7.0s

FindMMFObject(const TMMFMessageDestination &, CMMFObject *&)

IMPORT_C TInt FindMMFObject ( const TMMFMessageDestination & aObjectHandle,
CMMFObject *& aObjectFound
)

Finds an object in the container using a handle.

Since
7.0s

Parameters

const TMMFMessageDestination & aObjectHandle The handle of the object to be located.
CMMFObject *& aObjectFound A reference to a pointer to the object found in the container.

FindMMFObject(const CMMFObject &, TInt &)

TInt FindMMFObject ( const CMMFObject & aObject,
TInt & aPositionInArray
) [private]

Internal method to find an object in the array.

Parameters

const CMMFObject & aObject
TInt & aPositionInArray

GenerateObjectHandle()

TInt GenerateObjectHandle ( ) [private]

Internal method used to generate the object handle for a newly added object.

MMFObjects()

const RPointerArray < CMMFObject > & MMFObjects ( )

RemoveAndDestroyMMFObject(CMMFObject &)

IMPORT_C void RemoveAndDestroyMMFObject ( CMMFObject & aObject )

Removes and destroys an object from the container.

This method ensures that the object is no longer in the container, and that it gets deleted. Even if the object is not found in the container's array of objects, it will be deleted.

Since
7.0s

Parameters

CMMFObject & aObject A reference to the object to be deleted.

Member Data Documentation

TInt iNextObjectHandle

TInt iNextObjectHandle [private]

The next available object handle.

RPointerArray< CMMFObject > iObjects

RPointerArray < CMMFObject > iObjects [private]

The array of objects.