Nokia N97 SDK
Example Applications Guide

guienginedocument.h

00001 /*
00002 * ==============================================================================
00003 *  Name        : guienginedocument.h
00004 *  Part of     : GuiEngine
00005 *  Interface   :
00006 *  Description :
00007 *  Version     :
00008 *
00009 *  Copyright (c) 2004 - 2006 Nokia Corporation.
00010 *  This material, including documentation and any related
00011 *  computer programs, is protected by copyright controlled by
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 
00017 #ifndef __GUIENGINEDOCUMENT_H__
00018 #define __GUIENGINEDOCUMENT_H__
00019 
00020 
00021 // INCLUDES
00022 #include <akndoc.h>
00023 #include "ShapeListManager.h"
00024 
00025 
00026 // FORWARD DECLARATIONS
00027 class CGuiEngineAppUi;
00028 class CEikApplication;
00029 
00030 
00031 // CLASS DECLARATION
00032 
00033 /**
00034 * CGuiEngineDocument, An instance of class CGuiEngineDocument is the Document
00035 * part of the CKON application framework for the GuiEngine example application
00036 */
00037 class CGuiEngineDocument : public CEikDocument
00038     {
00039 
00040     public: // Constructors and destructor
00041 
00042         /**
00043         * NewL
00044         * Two-phased constructor.
00045         * Construct a CGuiEngineDocument for the AVKON application aApp.
00046         * Using two phase construction, and return a pointer to the
00047         * created object.
00048         * @param aApp Application creating this document.
00049         * @return Returns a pointer to the instance which is also on the
00050         * cleanup stack
00051         */
00052         static CGuiEngineDocument* NewL( CEikApplication& aApp );
00053 
00054         /**
00055         * NewLC
00056         * Two-phased constructor.
00057         * Construct a CGuiEngineDocument for the AVKON application aApp.
00058         * Using two phase construction, and return a pointer to the
00059         * created object.
00060         * @param aApp Application creating this document.
00061         * @return Returns a pointer to the instance which is also on the
00062         * cleanup stack
00063         */
00064         static CGuiEngineDocument* NewLC( CEikApplication& aApp) ;
00065 
00066 
00067         /**
00068         * ~CGuiEngineDocument
00069         * Virtual Destructor.
00070         */
00071         virtual ~CGuiEngineDocument();
00072 
00073     public: // New functions
00074 
00075         /**
00076         * Model
00077         * Get the model associated with the document
00078         * @return a pointer
00079         */
00080         CShapeListManager* Model();
00081 
00082 
00083     public: // from CEikDocument
00084 
00085         /**
00086         * StoreL
00087         * Store the document to the store
00088         * @param aStore the store to save the data to
00089         * @param aStreamDict the dictionary to hold the stream id of the data stream
00090         */
00091         void StoreL( CStreamStore& aStore,
00092                      CStreamDictionary& aStreamDict ) const;
00093 
00094         /**
00095         * RestoreL
00096         * Restore the document from the store
00097         * @param aStore the store to containing the data to
00098         * @param aStreamDict the dictionary that holds the stream id of the data stream
00099         */
00100         void RestoreL( const CStreamStore& aStore,
00101                        const CStreamDictionary& aStreamDict );
00102 
00103     private: // Constructors
00104 
00105         /**
00106         * CGuiEngineDocument.
00107         * C++ default constructor.
00108         * @param aApp Reference to Application class object
00109         */
00110         CGuiEngineDocument( CEikApplication& aApp );
00111 
00112         /**
00113         * ConstructL
00114         * 2nd phase constructor.
00115         */
00116         void ConstructL();
00117 
00118     private: // From CEikDocument
00119 
00120         /**
00121         * CreateAppUiL
00122         * Create a CGuiEngineAppUi object and return a pointer to it.
00123         * The object returned is owned by the Uikon framework.
00124         * @return Pointer to created instance of AppUi.
00125         */
00126         CEikAppUi* CreateAppUiL();
00127 
00128     private: // Data
00129 
00130         /**
00131         * iModel,  The model
00132         * Owned by CGuiEngineDocument object.
00133         */
00134         CShapeListManager*  iModel;
00135 
00136     };
00137 
00138 #endif // __GUIENGINEDOCUMENT_H__
00139 
00140 
00141 // End of File

© Nokia 2009

Back to top