Factories::CFactoryBase Class Reference

class Factories::CFactoryBase : public CBase

Factory Base class provides basic object managment functionlity and the ability for a factory to be load from another Dynamic Linked Library via the ECOM framework.

It also provides asynchronous destruction for it's managed objects (if required) but also copes with synchronous destruction, should a managed object get deleted by another entity.

Inherits from

Constructor & Destructor Documentation

CFactoryBase(TUid, CFactoryContainer &)

IMPORT_C CFactoryBase ( TUid aFactoryUid,
CFactoryContainer & aParentContainer
) [protected, explicit]

Constructor

Parameters

TUid aFactoryUid
CFactoryContainer & aParentContainer

~CFactoryBase()

IMPORT_C ~CFactoryBase ( ) [protected]

Destructor

Member Functions Documentation

AddManagedObjectL(AFactoryObject &)

IMPORT_C TFactoryObjectEntry & AddManagedObjectL ( AFactoryObject & aObject ) [protected]

Add a AFactoryObject to the managed collection AFactoryObject Since 9.0

Parameters

AFactoryObject & aObject the AFactoryObject object to be added

ConstructL(const TUid &)

IMPORT_C void ConstructL ( const TUid & aDestroyUid ) [protected]

Parameters

const TUid & aDestroyUid

ConstructL()

IMPORT_C void ConstructL ( ) [protected]

DeRegisterNotifier(const IFactoryNotify &)

IMPORT_C void DeRegisterNotifier ( const IFactoryNotify & aFactoryNotify )

De-registers a callback for factory notification

IFactoryNotify CFactoryBase::RegisterNotifierL

Parameters

const IFactoryNotify & aFactoryNotify The IFactoryNotify object that implements the callback

FindObject(MFactoryQuery &)

IMPORT_C AFactoryObject * FindObject ( MFactoryQuery & aQuery ) const [protected]

Find a factory based on criteria specified by aQuery MFactoryQuery

Parameters

MFactoryQuery & aQuery a MFactoryQuery derived object implementing MFactoryQuery::Match

ManagedObjectBeingDeleted(AFactoryObject &)

IMPORT_C void ManagedObjectBeingDeleted ( AFactoryObject & aObject ) [protected]

Parameters

AFactoryObject & aObject

NewL(const TDesC8 &, const TUid &, CFactoryContainer &)

IMPORT_C CFactoryBase * NewL ( const TDesC8 & aName,
const TUid & aInterfaceUid,
CFactoryContainer & aParentContainer
) [static]

Create a new instance of a factory (cnstructed via ECOM using the name and the interfaceUId specified

Exceptions
leaves

with KErrNoMemory in out of memory conditions

Parameters

const TDesC8 & aName The name (string representation) of the factory
const TUid & aInterfaceUid The interface Uid that ECOM should use to load the implementation
CFactoryContainer & aParentContainer The factory container the factory should become a member of

NewL(const TUid &, CFactoryContainer &)

IMPORT_C CFactoryBase * NewL ( const TUid & aImplementationUid,
CFactoryContainer & aParentContainer
) [static]

Create a new instance of a factory (cnstructed via ECOM using the name and the interfaceUId specified

Exceptions
leaves

with KErrNoMemory in out of memory conditions

Parameters

const TUid & aImplementationUid The interface Uid that ECOM should use to load the implementation
CFactoryContainer & aParentContainer The factory container the factory should become a member of

ParentContainer()

CFactoryContainer & ParentContainer ( ) [inline]

RegisterNotifierL(const IFactoryNotify &)

IMPORT_C void RegisterNotifierL ( const IFactoryNotify & aFactoryNotify )

Registers a callback for factory notification

IFactoryNotify

Parameters

const IFactoryNotify & aFactoryNotify The IFactoryNotify object that implements the callback

RemoveManagedObject(AFactoryObject &)

IMPORT_C void RemoveManagedObject ( AFactoryObject & aObject ) [protected]

Parameters

AFactoryObject & aObject

RemoveManagedObject(TInt)

void RemoveManagedObject ( TInt aIndex ) [private]

Parameters

TInt aIndex

SignalCreation(AFactoryObject &)

IMPORT_C TInt SignalCreation ( AFactoryObject & aObject ) [private]

Parameters

AFactoryObject & aObject

SignalDeletion(AFactoryObject &)

IMPORT_C void SignalDeletion ( AFactoryObject & aObject ) [private]

Parameters

AFactoryObject & aObject

Uid()

IMPORT_C TUid Uid ( ) const

Getter for the identifier of the object specified during construction

Member Data Documentation

TUid iDestroyUid

TUid iDestroyUid [private]

RArray< IFactoryNotify > iFactoryNotify

RArray < IFactoryNotify > iFactoryNotify [protected]

TUid iFactoryUid

TUid iFactoryUid [private]

RArray< TFactoryObjectEntry > iObjects

RArray < TFactoryObjectEntry > iObjects [private]

CFactoryContainer & iParentContainer

CFactoryContainer & iParentContainer [private]