Factories::CFactoryContainer Class Reference

class Factories::CFactoryContainer : public CBase

Factory Factory Container class is used to store factory objects of a specific type. It provides basic functionality to find, add and remove factories.

Inherits from

  • Factories::CFactoryContainer

Constructor & Destructor Documentation

CFactoryContainer()

IMPORT_C CFactoryContainer ( ) [protected, explicit]

~CFactoryContainer()

IMPORT_C ~CFactoryContainer ( )

Destructor - cleanup Factories (delete them all)

Member Functions Documentation

AddL(CFactoryBase &)

IMPORT_C void AddL ( CFactoryBase & aFactory ) [protected]

Add a factory to this container

Parameters

CFactoryBase & aFactory Factory to be added to the container

Factory(TInt)

IMPORT_C CFactoryBase * Factory ( TInt aIndex ) const [protected]

Parameters

TInt aIndex

FetchNodeInterfaceControlL(TInt)

IMPORT_C NetInterfaces::TInterfaceControl * FetchNodeInterfaceControlL ( TInt aInterfaceId ) [virtual]

Iterates through all the held factories and asks them whether they implment the requested interface. As factory containers are not meant to be derived from, this implementation is an accepted deviation from the original semantics of FetchNodeInterfaceControlL.

Exceptions
Leaves

with KErrNotSupported if none of the factories implement the interface

NetInterfaces::TInterfaceControl

Parameters

TInt aInterfaceId The id of the requested interface extension.

FindFactory(TUid)

IMPORT_C CFactoryBase * FindFactory ( TUid aFactoryUid ) const

Search this factory container for a factory with a matching id

Parameters

TUid aFactoryUid Id of the factory the caller wishes to find

FindObject(MFactoryQuery &)

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

Parameters

MFactoryQuery & aQuery

RegisterNotifierL(TUid, const IFactoryNotify &)

IMPORT_C void RegisterNotifierL ( TUid aFactoryUid,
const IFactoryNotify & aFactoryNotify
)

Registers a callback for factory container notification

Exceptions
Leaves

with KErrArgument if the factory specified by aFactoryId is not found

IConnectionFactoryNotify

Parameters

TUid aFactoryUid The Id of the factory that will be registered
const IFactoryNotify & aFactoryNotify The IConnectionFactoryNotify object that implements the callback

Member Data Documentation

RPointerArray< CFactoryBase > iFactories

RPointerArray < CFactoryBase > iFactories [private]