TXIMPGetInterface Class Reference

class TXIMPGetInterface

Interface query and type cast helper.

Templated interface query and type cast helper. Capable to retrieve const interface from const source object and non-const interface from non-const source object.

Const interface usage example:
 const MXIMPBase* obj = GetObjectImplementingTheInterfaceLC();

 const MXimpFwTheInterface* theInterface =
      TXIMPGetInterface< const MXimpFwTheInterface >::From( *obj,
                                                          MXIMPBase::EPanicIfUnknown );
 theInterface->DoSomething();
Non-const interface usage example:
 MXIMPBase* obj = GetObjectImplementingTheInterfaceLC();

 MXimpFwTheInterface* theInterface =
      TXIMPGetInterface< MXimpFwTheInterface >::From( *obj,
                                                    MXIMPBase::EPanicIfUnknown );
 theInterface->DoSomething();
Since
S60 v3.2
Public Member Functions
T *From(const MXIMPBase &, MXIMPBase::TIfGetOps)
T *From(MXIMPBase &, MXIMPBase::TIfGetOps)
Private Member Functions
TXIMPGetInterface()

Constructor & Destructor Documentation

TXIMPGetInterface()

TXIMPGetInterface()[private]

Member Functions Documentation

From(const MXIMPBase &, MXIMPBase::TIfGetOps)

T *From(const MXIMPBase &aObj,
MXIMPBase::TIfGetOpsaOps
)[static, inline]

Interface query and type cast.

Encapsulates query of const interface from given const source object. The retrieved interface type is defined with template parameter. KInterfaceId identifier from template parameter, is used to identify the retrieved interface.

Parameters

const MXIMPBase & aObjSource object from where to retrieve interface.
MXIMPBase::TIfGetOps aOpsOptions for interface resolving. Given options are delivered directly to MXIMPBase::GetInterface().

From(MXIMPBase &, MXIMPBase::TIfGetOps)

T *From(MXIMPBase &aObj,
MXIMPBase::TIfGetOpsaOps
)[static, inline]

Interface query and type cast.

Encapsulates query of interface from given source object. The retrieved interface type is defined with template parameter. KInterfaceId identifier from template parameter, is used to identify the retrieved interface.

Parameters

MXIMPBase & aObjSource object from where to retrieve interface.
MXIMPBase::TIfGetOps aOpsOptions for interface resolving. Given options are delivered directly to MXIMPBase::GetInterface().