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 void DetachFromStoreL ( TDetach )
IMPORT_C void Draw ( CGraphicsContext &, const TPoint &, const TRect &, MGraphicsDeviceMap *)
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C void GetOriginalSizeInTwips ( TSize &)
CApaModelHeader * ModelHeader ()
IMPORT_C CApaModelDoor * NewL ( CApaModelHeader *)
IMPORT_C CApaModelDoor * NewL (const CStreamStore &, TStreamId , const MApaModelHeaderFactory *)
IMPORT_C CApaModelDoor * NewLC ( CApaModelHeader *)
IMPORT_C void RestoreL (const CStreamStore &, TStreamId , const MApaModelHeaderFactory *)
IMPORT_C TInt ScaleFactorHeight ()
IMPORT_C TInt ScaleFactorWidth ()
void SetFormat ( TFormat )
IMPORT_C void SetScaleFactor ( TInt , TInt )
IMPORT_C TStreamId StoreL ( CStreamStore &)
Private Member Functions
CApaModelDoor ()
CApaModelDoor ( CApaModelHeader *)
void CopyStoreL (const CEmbeddedStore &, RWriteStream &)
TSize GlassDoorSize ()
void InternalizeModelL (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 &)

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

Parameters

const CEmbeddedStore & aSourceStore
RWriteStream & aTargetStream

DetachFromStoreL(TDetach)

IMPORT_C void DetachFromStoreL ( TDetach  = EDetachFull ) [virtual]

Restores the model to the specified degree.

Parameters

TDetach  = EDetachFull The degree to which restoration is needed.

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

IMPORT_C void Draw ( 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 void ExternalizeL ( RWriteStream & aStream ) const [virtual]

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

Parameters

RWriteStream & aStream

GetOriginalSizeInTwips(TSize &)

IMPORT_C void GetOriginalSizeInTwips ( TSize & aSize ) const [virtual]

Gets the door's original size, in twips.

Parameters

TSize & aSize This 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.

InternalizeModelL(const MApaModelHeaderFactory &)

void InternalizeModelL ( const MApaModelHeaderFactory & aFactory ) [private]

Parameters

const MApaModelHeaderFactory & aFactory

ModelHeader()

CApaModelHeader * ModelHeader ( ) [inline]

Gets the application model wrapper object.

NewL(CApaModelHeader *)

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

Creates a model door object.

Parameters

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

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

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

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

MApaModelHeaderFactory

Parameters

const CStreamStore & aStore The store from which the model door is to be restored.
TStreamId aHeadStreamId The 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 * aFactory A 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.

Parameters

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

ReadStreamDictionaryLC(const CStreamStore &, TStreamId)

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

Parameters

const CStreamStore & aSourceStore
TStreamId aStreamId

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

IMPORT_C void RestoreL ( const CStreamStore & aStore,
TStreamId aHeadStreamId,
const MApaModelHeaderFactory * aFactory
)

Restores the embedded model data from the specified store.

Parameters

const CStreamStore & aStore The store from which the embedded model data is to be restored.
TStreamId aHeadStreamId The 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 * aFactory A 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 TInt ScaleFactorHeight ( ) const [virtual]

Gets the door's height scale factor.

ScaleFactorWidth()

IMPORT_C TInt ScaleFactorWidth ( ) const [virtual]

Gets the door's width scale factor.

SetFormat(TFormat)

void SetFormat ( TFormat aFormat ) [inline]

Sets the format of the door.

Parameters

TFormat aFormat The format for the graphical representation of the embedded document.

SetScaleFactor(TInt, TInt)

IMPORT_C void SetScaleFactor ( TInt aScaleFactorWidth,
TInt aScaleFactorHeight
) [virtual]

Sets the door's scale factors.

Parameters

TInt aScaleFactorWidth The width scale factor, in percent.
TInt aScaleFactorHeight The height scale factor, in percent.

StoreL(CStreamStore &)

IMPORT_C TStreamId StoreL ( 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.

Parameters

CStreamStore & aStore The 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]