localisation/apparchitecture/inc/APAMDR.H
branchSymbian3
changeset 57 b8d18c84f71c
parent 6 c108117318cb
--- a/localisation/apparchitecture/inc/APAMDR.H	Wed Jul 28 16:03:37 2010 +0100
+++ b/localisation/apparchitecture/inc/APAMDR.H	Tue Aug 03 10:20:34 2010 +0100
@@ -1,7 +1,7 @@
 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
-// under the terms of the License "Eclipse Public License v1.0"
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
@@ -11,60 +11,45 @@
 // Contributors:
 //
 // Description:
+// apamdr.h
 //
 
 #ifndef __APAMDR_H__
 #define __APAMDR_H__
 
-#if !defined(__E32STD_H__)
 #include <e32std.h>
-#endif
-#if !defined(__E32BASE_H__)
 #include <e32base.h>
-#endif
-#if !defined(__GDI_H__)
 #include <gdi.h>
-#endif
-#if !defined(__APADBASE_H__)
 #include <apadbase.h>
-#endif
 
-// classes defined:
-class TApaModelDoorFactory;
-class CApaModelDoor;
-class CApaModelHeader;
-class MApaModelHeaderFactory;
-//
-// classes referenced:
 class RReadStream;
 class RWriteStream;
 class CStreamStore;
 class CStreamDictionary;
 class CEmbeddedStore;
 class TApaAppIdentifier;
-//
+class MApaModelHeaderFactory;
+class CApaModelHeader;
 
 
-class TApaModelDoorFactory : public MPictureFactory
-// Recognizes KUidPictureTypeDoor and creates CApaModelDoor pictures
 /** A factory class for instantiating and restoring an application's door using 
 the application's model. 
 
 @publishedAll 
 @released */
+class TApaModelDoorFactory : public MPictureFactory
+// Recognizes KUidPictureTypeDoor and creates CApaModelDoor pictures
 	{
 public:
 	IMPORT_C TApaModelDoorFactory(const MApaModelHeaderFactory* aFactory);
-	//
-	// from MPictureFactory
-	IMPORT_C void NewPictureL(TPictureHeader& aPictureHeader,const CStreamStore& aPictureStore)const; // used to create CApaDoor's during document restore only 
+public:	// from MPictureFactory
+	IMPORT_C void NewPictureL(TPictureHeader& aPictureHeader, const CStreamStore& aPictureStore) const; // used to create CApaDoor's during document restore only 
 private:
 	const MApaModelHeaderFactory* iHeaderFactory;
 	TInt iTApaModelDoorFactory_Reserved1;
 	};
 
 
-class CApaModelDoor : public CApaDoorBase
 /** A persistent representation of a door that also acts as a wrapper around an 
 application's model.
 
@@ -73,12 +58,13 @@
 
 @publishedAll 
 @released */
+class CApaModelDoor : public CApaDoorBase
 	{
 public:
 	IMPORT_C static CApaModelDoor* NewL(CApaModelHeader* aHeader);
 	IMPORT_C static CApaModelDoor* NewLC(CApaModelHeader* aHeader);
-	IMPORT_C static CApaModelDoor* NewL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory);
-	//
+	IMPORT_C static CApaModelDoor* NewL(const CStreamStore& aStore, TStreamId aHeadStreamId, const MApaModelHeaderFactory* aFactory);
+
 	/** Gets the application model wrapper object.
 	
 	@return A pointer to the application model wrapper object. */
@@ -89,13 +75,10 @@
 	@param aFormat The format for the graphical representation of the embedded 
 	document. */
 	inline void SetFormat(TFormat aFormat) { iFormat = aFormat; }
-	//
 	IMPORT_C TStreamId StoreL(CStreamStore& aStore) const;
 	IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory);
-	//
 	IMPORT_C ~CApaModelDoor();
-	//
-	// from CPicture
+public:	// from CPicture
 	IMPORT_C void DetachFromStoreL(TDetach /*aDegree*/=EDetachFull); //lint !e1735 Virtual function has default parameter - Inherited from CPicture, must be fixed there
 	IMPORT_C void ExternalizeL(RWriteStream& aStream)const;
 	IMPORT_C void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect,MGraphicsDeviceMap* aMap)const; 
@@ -103,16 +86,13 @@
 	IMPORT_C void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); 
 	IMPORT_C TInt ScaleFactorWidth()const; 
 	IMPORT_C TInt ScaleFactorHeight()const;
-	//
 private:
 	CApaModelDoor();
 	CApaModelDoor(CApaModelHeader* aHeader);
-	//
 	static CStreamDictionary* ReadStreamDictionaryLC(const CStreamStore& aSourceStore,TStreamId aStreamId);
 	static void CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream);
 	void InternalizeModelL(const MApaModelHeaderFactory& aFactory);
-	//
-	// from CApaDoorBase
+private: // from CApaDoorBase
 	TSize GlassDoorSize()const;
 private:
 	CApaModelHeader* iModelHeader;
@@ -122,7 +102,6 @@
 	};
 
 
-class CApaModelHeader : public CBase
 // Abstract wrapper for an applications model - used for file format conversion etc
 /** An interface class that acts as a wrapper for an application model.
 
@@ -142,6 +121,7 @@
 @see CApaModelDoor
 @see TApaModelDoorFactory
 @see MApaModelHeaderFactory */
+class CApaModelHeader : public CBase
 	{
 public:
 	/** Stores the model and its components in the specified store.
@@ -149,18 +129,18 @@
 	@param aStore The store in which the model's components are to be stored.
 	@param aDict The stream dictionary into which stream IDs and associated UIDs 
 	are put. */
-	virtual void StoreL(CStreamStore& aStore,CStreamDictionary& aDict) const=0;
+	virtual void StoreL(CStreamStore& aStore, CStreamDictionary& aDict) const = 0;
 	/** Gets the identity of the application associated with the application model.
 	
 	@return The application identity. */
-	virtual TApaAppIdentifier AppId()const=0;
+	virtual TApaAppIdentifier AppId() const = 0;
 	/** Restores the model to the specified degree.
 	
 	An implementation of this function should propagate this call to all components 
 	of the model.
 	
 	@param aDegree The degree to which restoration is needed. */
-	virtual void DetachFromStoreL(CPicture::TDetach aDegree)=0;
+	virtual void DetachFromStoreL(CPicture::TDetach aDegree) = 0;
 protected:
 	IMPORT_C CApaModelHeader();
 private:
@@ -169,16 +149,15 @@
 private:
 	TInt iCApaModelHeader_Reserved1;
 	};
-
+	
 
-
-class MApaModelHeaderFactory
 /** An interface class that applications implement to construct an application model 
 wrapper object, also known as the application model header.
 
 @publishedAll
 @released
 @see CApaModelHeader */
+class MApaModelHeaderFactory
 	{
 public:	
 	/** Creates and returns an application model wrapper object.
@@ -188,7 +167,7 @@
 	@param aAppId The application's identity held as a stream in the application's 
 	store
 	@return A pointer to the new application model wrapper object. */
-	virtual CApaModelHeader* NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict,const TApaAppIdentifier& aAppId)const=0;
+	virtual CApaModelHeader* NewHeaderL(const CStreamStore& aStore, const CStreamDictionary& aDict, const TApaAppIdentifier& aAppId) const = 0;
 protected:
 	IMPORT_C MApaModelHeaderFactory();
 private: