CApaModelDoor Class Reference

class CApaModelDoor : public CApaDoorBase

A persistent representation of a door that also acts as a wrapper around an application's model.

The class allows embedded data to be manipulated without requiring the whole associated application.

Inherits from

Public Member Functions
~CApaModelDoor()
IMPORT_C voidDetachFromStoreL(TDetach)
IMPORT_C voidDraw(CGraphicsContext &, const TPoint &, const TRect &, MGraphicsDeviceMap *)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C voidGetOriginalSizeInTwips(TSize &)
CApaModelHeader *ModelHeader()
IMPORT_C CApaModelDoor *NewL(CApaModelHeader *)
IMPORT_C CApaModelDoor *NewL(const CStreamStore &, TStreamId, const MApaModelHeaderFactory *)
IMPORT_C CApaModelDoor *NewLC(CApaModelHeader *)
IMPORT_C voidRestoreL(const CStreamStore &, TStreamId, const MApaModelHeaderFactory *)
IMPORT_C TIntScaleFactorHeight()
IMPORT_C TIntScaleFactorWidth()
voidSetFormat(TFormat)
IMPORT_C voidSetScaleFactor(TInt, TInt)
IMPORT_C TStreamIdStoreL(CStreamStore &)
Private Member Functions
CApaModelDoor()
CApaModelDoor(CApaModelHeader *)
voidCopyStoreL(const CEmbeddedStore &, RWriteStream &)
TSize GlassDoorSize()
voidInternalizeModelL(const MApaModelHeaderFactory &)
CStreamDictionary *ReadStreamDictionaryLC(const CStreamStore &, TStreamId)
Inherited Functions
CApaDoorBase::CApaDoorBase()
CApaDoorBase::Capability()const
CApaDoorBase::ExternalizeBaseStreamL(CStreamStore &,CStreamDictionary &)const
CApaDoorBase::Format()const
CApaDoorBase::GetCropInTwips(TMargins &)const
CApaDoorBase::InternalizeBaseStreamL(const CStreamStore &,const CStreamDictionary &)
CApaDoorBase::LineBreakPossible(TUint,TBool,TBool)const
CApaDoorBase::NativePixelSize(TSize &)
CApaDoorBase::SetCropInTwips(const TMargins &)
CApaDoorBase::SetSource(TUid)
CApaDoorBase::Source()const
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CPicture::AddCropInPixels(MGraphicsDeviceMap *,const TMargins &)
CPicture::CPicture()
CPicture::GetSizeInPixels(MGraphicsDeviceMap *,TSize &)const
CPicture::GetSizeInTwips(TSize &)const
CPicture::ResetToOriginal()
CPicture::SetSizeInPixels(MGraphicsDeviceMap *,const TSize &)
CPicture::SetSizeInTwips(const TSize &)
CPicture::~CPicture()
Inherited Enumerations
CApaDoorBase:TFormat
CPicture:TDetach
Private Attributes
CApaModelHeader *iModelHeader
TSize iScaleFactor
CEmbeddedStore *iStore
CBufSeg *iStoreHost
Inherited Attributes
CApaDoorBase::iFormat
CApaDoorBase::iSource

Constructor & Destructor Documentation

CApaModelDoor()

CApaModelDoor()[private]

CApaModelDoor(CApaModelHeader *)

CApaModelDoor(CApaModelHeader *aHeader)[private]

Parameters

CApaModelHeader * aHeader

~CApaModelDoor()

IMPORT_C~CApaModelDoor()

Destructor.

Frees all resources owned by the object, prior to its destruction.

Member Functions Documentation

CopyStoreL(const CEmbeddedStore &, RWriteStream &)

voidCopyStoreL(const CEmbeddedStore &aSourceStore,
RWriteStream &aTargetStream
)[private, static]

Parameters

const CEmbeddedStore & aSourceStore
RWriteStream & aTargetStream

DetachFromStoreL(TDetach)

IMPORT_C voidDetachFromStoreL(TDetach = EDetachFull)[virtual]

Restores the model to the specified degree.

Parameters

TDetach  = EDetachFullThe degree to which restoration is needed.

Draw(CGraphicsContext &, const TPoint &, const TRect &, MGraphicsDeviceMap *)

IMPORT_C voidDraw(CGraphicsContext &aGc,
const TPoint &aTopLeft,
const TRect &aClipRect,
MGraphicsDeviceMap *aMap
)const [virtual]

Not supported; if called, raises an APPARC 17 panic.

Parameters

CGraphicsContext & aGc
const TPoint & aTopLeft
const TRect & aClipRect
MGraphicsDeviceMap * aMap

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const [virtual]

Not supported; if called, raises an APPARC 17 panic.

Parameters

RWriteStream & aStream

GetOriginalSizeInTwips(TSize &)

IMPORT_C voidGetOriginalSizeInTwips(TSize &aSize)const [virtual]

Gets the door's original size, in twips.

Parameters

TSize & aSizeThis size, in twips.

GlassDoorSize()

TSize GlassDoorSize()const [private, virtual]

Returns the size of the glass door, in twips.

A concrete implementation of this function is provided by derived classes.

The size of the glass door, in twips.

InternalizeModelL(const MApaModelHeaderFactory &)

voidInternalizeModelL(const MApaModelHeaderFactory &aFactory)[private]

Parameters

const MApaModelHeaderFactory & aFactory

ModelHeader()

CApaModelHeader *ModelHeader()[inline]

Gets the application model wrapper object.

A pointer to the application model wrapper object.

NewL(CApaModelHeader *)

IMPORT_C CApaModelDoor *NewL(CApaModelHeader *aHeader)[static]

Creates a model door object.

A pointer to the new model door object.

Parameters

CApaModelHeader * aHeaderA pointer to an existing concrete application model wrapper object.

NewL(const CStreamStore &, TStreamId, const MApaModelHeaderFactory *)

IMPORT_C CApaModelDoor *NewL(const CStreamStore &aStore,
TStreamIdaHeadStreamId,
const MApaModelHeaderFactory *aFactory
)[static]

Creates a model door object and restores it from an embedded store within the specified store.

A pointer to the new model door object.

MApaModelHeaderFactory

Parameters

const CStreamStore & aStoreThe store from which the model door is to be restored.
TStreamId aHeadStreamIdThe head stream ID. This is the ID of the stream containing the stream dictionary which is restored as part of the process of creating this model door object. The stream dictionary contains the ID of the stream hosting the embedded store.
const MApaModelHeaderFactory * aFactoryA pointer to a factory object for constructing the application model wrapper object, also known as the application model header, a CApaModelHeader type.

NewLC(CApaModelHeader *)

IMPORT_C CApaModelDoor *NewLC(CApaModelHeader *aHeader)[static]

Creates a model door object, and puts a pointer to it onto the cleanup stack.

A pointer to the new model door object.

Parameters

CApaModelHeader * aHeaderA pointer to an existing concrete application model wrapper object.

ReadStreamDictionaryLC(const CStreamStore &, TStreamId)

CStreamDictionary *ReadStreamDictionaryLC(const CStreamStore &aSourceStore,
TStreamIdaStreamId
)[private, static]

Parameters

const CStreamStore & aSourceStore
TStreamId aStreamId

RestoreL(const CStreamStore &, TStreamId, const MApaModelHeaderFactory *)

IMPORT_C voidRestoreL(const CStreamStore &aStore,
TStreamIdaHeadStreamId,
const MApaModelHeaderFactory *aFactory
)

Restores the embedded model data from the specified store.

Parameters

const CStreamStore & aStoreThe store from which the embedded model data is to be restored.
TStreamId aHeadStreamIdThe stream ID of the head stream for the embedded model data. This stream contains the stream dictionary through which the embedded model data and its door can be restored.
const MApaModelHeaderFactory * aFactoryA pointer to a factory object for constructing the application model wrapper object, also known as the application model header, a CApaModelHeader type. The application model wrapper is provided by the application model (not the application UI), and supplies the knowledge for internalizing the application model data from an embedded store. The pointer must not be null, otherwise the function raises an APPARC 22 panic.

ScaleFactorHeight()

IMPORT_C TIntScaleFactorHeight()const [virtual]

Gets the door's height scale factor.

The height scale factor, in percent.

ScaleFactorWidth()

IMPORT_C TIntScaleFactorWidth()const [virtual]

Gets the door's width scale factor.

The width scale factor, in percent.

SetFormat(TFormat)

voidSetFormat(TFormataFormat)[inline]

Sets the format of the door.

Parameters

TFormat aFormatThe format for the graphical representation of the embedded document.

SetScaleFactor(TInt, TInt)

IMPORT_C voidSetScaleFactor(TIntaScaleFactorWidth,
TIntaScaleFactorHeight
)[virtual]

Sets the door's scale factors.

Parameters

TInt aScaleFactorWidthThe width scale factor, in percent.
TInt aScaleFactorHeightThe height scale factor, in percent.

StoreL(CStreamStore &)

IMPORT_C TStreamIdStoreL(CStreamStore &aStore)const [virtual]

Stores the model data in the specified store as an embedded store.

The function stores the model data, if the model exists in memory, otherwise, it simply copies the stream containing the embedded document into the specified store.

The stream ID of the head stream for the embedded model data. This stream contains the stream dictionary through which the embedded data and its door can be restored.

Parameters

CStreamStore & aStoreThe store in which the model data is to be stored.

Member Data Documentation

CApaModelHeader * iModelHeader

CApaModelHeader *iModelHeader[private]

TSize iScaleFactor

TSize iScaleFactor[private]

CEmbeddedStore * iStore

CEmbeddedStore *iStore[private]

CBufSeg * iStoreHost

CBufSeg *iStoreHost[private]