Location:
coemop.h
Link against: cone.lib
class MObjectProvider;
An interface that allows an object to be part of a network of object providers.
The object provider mechanism can be used to find and access objects of a given type, where the type is defined by a TTypeUid
object. Object providers may be arranged in a hierarchy, i.e. an object provider may have a parent-child relationship with
another object provider.
An object provider must provide an implementation for the MopSupplyObject()
function and can choose to provide an implementation for the MopNext()
function. Typically, it will also have functionality to define who its parent is.
CCoeControl
is an example of a class that implements this interface. Top level controls must have the view or app UI set as their object
provider. This is done by calling CCoeControl::SetMopParent()
on the view or the app UI. The view or app UI does this by calling the top level control's CCoeControl::SetMopParent()
function.
Defined in MObjectProvider
:
MObjectProvider()
, MObjectProvider_Reserved1()
, MObjectProvider_Reserved2()
, MopGetObject()
, MopGetObjectNoChaining()
, MopNext()
, MopSupplyObject()
inline T *MopGetObject(T *&aPtr);
Gets an object of the type defined by the template parameter.
The object may be supplied directly by this object provider, or by other object providers higher up the hierarchy.
|
|
inline T *MopGetObjectNoChaining(T *&aPtr);
Gets an object of the type defined by the template parameter.
The object will be supplied directly by this object provider, or NULL will be returned, this function does not recurse through the object chain.
|
|
private: virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId)=0;
Gets an object whose type is encapsulated by the specified TTypeUid
object.
|
|
private: virtual IMPORT_C void MObjectProvider_Reserved2();