|
Nokia N97 SDK Example Applications Guide |
#include <guienginedocument.h>
Inheritance diagram for CGuiEngineDocument:

Definition at line 37 of file guienginedocument.h.
Public Member Functions |
|
| virtual | ~CGuiEngineDocument () |
| CShapeListManager * | Model () |
| void | StoreL (CStreamStore &aStore, CStreamDictionary &aStreamDict) const |
| void | RestoreL (const CStreamStore &aStore, const CStreamDictionary &aStreamDict) |
Static Public Member Functions |
|
| static CGuiEngineDocument * | NewL (CEikApplication &aApp) |
| static CGuiEngineDocument * | NewLC (CEikApplication &aApp) |
Private Member Functions |
|
| CGuiEngineDocument (CEikApplication &aApp) | |
| void | ConstructL () |
| CEikAppUi * | CreateAppUiL () |
Private Attributes |
|
| CShapeListManager * | iModel |
|
|
~CGuiEngineDocument Virtual Destructor. Definition at line 77 of file guienginedocument.cpp. References iModel.
|
|
|
CGuiEngineDocument. C++ default constructor.
Definition at line 31 of file guienginedocument.cpp. Referenced by NewLC().
|
|
|
NewL Two-phased constructor. Construct a CGuiEngineDocument for the AVKON application aApp. Using two phase construction, and return a pointer to the created object.
Definition at line 42 of file guienginedocument.cpp. References NewLC(). Referenced by CGuiEngineApplication::CreateDocumentL(). 00043 { 00044 CGuiEngineDocument* self = NewLC( aApp ); 00045 CleanupStack::Pop( self ); 00046 return self; 00047 }
|
|
|
NewLC Two-phased constructor. Construct a CGuiEngineDocument for the AVKON application aApp. Using two phase construction, and return a pointer to the created object.
Definition at line 54 of file guienginedocument.cpp. References CGuiEngineDocument(). Referenced by NewL(). 00055 { 00056 CGuiEngineDocument* self = new ( ELeave ) CGuiEngineDocument( aApp ); 00057 CleanupStack::PushL( self ); 00058 self->ConstructL(); 00059 return self; 00060 }
|
|
|
Model Get the model associated with the document
Definition at line 166 of file guienginedocument.cpp. References iModel. Referenced by CGuiEngineAppView::Clear(), CGuiEngineAppView::Draw(), and CGuiEngineAppView::OfferKeyEventL(). 00167 { 00168 return iModel; 00169 }
|
|
||||||||||||
|
StoreL Store the document to the store
Definition at line 99 of file guienginedocument.cpp. References iModel, and CShapeListManager::StoreL(). 00101 { 00102 00103 // Get the model to save itself to the store 00104 TStreamId modelStreamId = iModel->StoreL( aStore ); 00105 00106 // Add an entry into the dictionary for the model data 00107 aStreamDic.AssignL( static_cast<CGuiEngineApplication*> 00108 ( Application() )->EngineDllUid(), modelStreamId ); 00109 00110 // Now get the Ui to store itself to the store 00111 TStreamId uiStreamId = static_cast<CGuiEngineAppUi*> 00112 ( iAppUi )->StoreL( aStore ); 00113 00114 // Add an entry for it to the dictionary 00115 aStreamDic.AssignL( static_cast<CGuiEngineApplication*> 00116 ( Application() )->AppDllUid(), uiStreamId ); 00117 }
|
|
||||||||||||
|
RestoreL Restore the document from the store
Definition at line 125 of file guienginedocument.cpp. References iModel, CShapeListManager::NewL(), and CShapeListManager::RestoreL(). 00127 { 00128 00129 // Do not set this as the document's model yet. 00130 // That way, if the restore fails, we have still 00131 // got the old model. 00132 00133 CShapeListManager* newModel = CShapeListManager::NewL(); 00134 CleanupStack::PushL( newModel ); 00135 00136 // Find the stream id for the model's data 00137 TStreamId modelStreamId = aStreamDic.At( static_cast<CGuiEngineApplication*> 00138 ( Application() )->EngineDllUid() ); 00139 00140 // Restore the model from that stream 00141 newModel->RestoreL( aStore, modelStreamId ); 00142 00143 // Now get rid of the old model and set the new one as current 00144 delete iModel; 00145 00146 iModel = newModel; 00147 CleanupStack::Pop( newModel ); 00148 00149 // Just restored so can't have changed 00150 SetChanged( EFalse ); 00151 00152 // Now restore UI data 00153 TStreamId uiStreamId; 00154 00155 uiStreamId = aStreamDic.At( static_cast<CGuiEngineApplication*> 00156 ( Application() )->AppDllUid() ); 00157 00158 ( static_cast<CGuiEngineAppUi*>( iAppUi ) )->RestoreL( aStore, uiStreamId ); 00159 }
|
|
|
ConstructL 2nd phase constructor. Definition at line 67 of file guienginedocument.cpp. References iModel, and CShapeListManager::NewL(). 00068 { 00069 iModel = CShapeListManager::NewL(); 00070 }
|
|
|
CreateAppUiL Create a CGuiEngineAppUi object and return a pointer to it. The object returned is owned by the Uikon framework.
Definition at line 89 of file guienginedocument.cpp. 00090 { 00091 return ( static_cast<CEikAppUi*>( new ( ELeave ) CGuiEngineAppUi( this ) ) ); 00092 }
|
|
|
iModel, The model Owned by CGuiEngineDocument object. Definition at line 134 of file guienginedocument.h. Referenced by ConstructL(), Model(), RestoreL(), StoreL(), and ~CGuiEngineDocument(). |
|
© Nokia 2009 |