EPOC   SDK Home Glossary Indexes Previous Next Up

MtmUiDataFactoryFunctionL typedef


MtmUiDataFactoryFunctionL typedef — UI Data MTM factory

typedef CBaseMtmUiData* MtmUiDataFactoryFunctionL(CRegisteredMtmDll&);

Defined in

mtudreg.h

Description

A concrete UI Data MTM must implement an exported factory function of this type. It should return an instance of the CBaseMtmUiData-derived class that provides the implementation. The factory function is called by the UI Data MTM registry when a client requests this UI Data MTM.

A CBaseMtmUiData-derived class typically provides a NewL() function, which the factory function calls.

The factory function is called by ordinal. The ordinal of the function must match that recorded in the MTM’s registry information.

Arguments

CRegisteredMtmDll& aRegisteredMtmDll

Registration data for the MTM DLL

Return value

CBaseMtmUiData*

A newly-created instance of the CBaseMtmUiData-derived class for the UI Data MTM.

Leave considerations

The factory function should leave if it cannot create the object.

Example

For example, a UI Data MTM whose concrete class was CEgMtmUiData could define a suitable factory function as:

    EXPORT_C CBaseMtmUiData* NewEgMtmL(CRegisteredMtmDll& aRegisteredMtmDll)
          {
          return CEgMtmUiData::NewL(aRegisteredMtmDll);
          }
EPOC       SDK Home Glossary Indexes Previous Next Up