graphicstools/bitmapfonttools/inc/RECORD.H
author Faisal Memon <faisal.memon@nokia.com>
Fri, 13 Aug 2010 15:11:40 +0100
branchbug235_bringup_0
changeset 146 4d1fe4a7ce83
parent 0 5d03bc08d59c
permissions -rw-r--r--
Support bug 235 by providing interface layers in graphics. First is the surface manager API, to be implemented in graphics.nokia, second is the adptation-to-adaption interface for the guestvideodriver and virtual video hardware. This allows graphics.nokia to provide a syborg version of surface manager driver based upon the guestvideodriver, implemented in the graphics.simulator package. This submission includes a version 2 syntax package definition file purely for those components of interest to bug 235. This makes selective compilation of the graphics package easier. A further submission will prune down the surface manager component in the graphics package.

/*
* 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 "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
* Header RECORD.H
*
*/


#ifndef __RECORD_H__
#define __RECORD_H__

#include "LEXICAL.H"
#include "LST.H"
#include "STRNG.H"

/**
@file
@publishedAll
*/

const boolean Proportional = 1; /**< WARNING: Constant for internal use ONLY.  Compatibility is not guaranteed in future releases. */
const boolean Serif = 2; /**< WARNING: Constant for internal use ONLY.  Compatibility is not guaranteed in future releases. */
const boolean Symbol = 4; /**< WARNING: Constant for internal use ONLY.  Compatibility is not guaranteed in future releases. */

/**
@publishedAll
WARNING: Function for internal use ONLY.  Compatibility is not guaranteed in future releases.
*/
inline void ExternalizeStreamOff(ostream& out, streamoff aOffset)
	{
	// This will limit the file to 4gig.
	// Need to change this if all compilers support file size greater than 4gig.
	uint32 offset = static_cast<uint32>(aOffset);
	out.write(reinterpret_cast<char*>(&offset), sizeof(offset));
	}

class Record
/**
@publishedAll
WARNING: Class for internal use ONLY.  Compatibility is not guaranteed in future releases.
*/
	{
public:
	IMPORT_C Record();
	virtual void Externalize(ostream& out) = 0;
	virtual void ExternalizeComponents(ostream&){};
public:
	String iLabel;
	streampos iStreamId;
	};

class RecordList : public ObjectList<Record*>
/**
@publishedAll
WARNING: Class for internal use ONLY.  Compatibility is not guaranteed in future releases.
*/
	{
public:
	void ExternalizeIds(ostream& out);
	void Externalize(ostream& out);
	void ExternalizeComponents(ostream& out);
	IMPORT_C void Add(Record* aRecord);
	IMPORT_C Record *LabelToRecord(const String& aLabel);
	IMPORT_C void Destroy();
	IMPORT_C ~RecordList();
	};

class Typeface
/**
@publishedAll
WARNING: Class for internal use ONLY.  Compatibility is not guaranteed in future releases.
*/
	{
public:
	IMPORT_C Typeface();
	void Externalize(ostream& out);
public:
	String iName;
	boolean iFlags;
	};

class Point
/**
@publishedAll
WARNING: Class for internal use ONLY.  Compatibility is not guaranteed in future releases.
*/
	{
public:
	void Externalize(ostream& out);
public:
	int32 iX;
	int32 iY;
	};

#endif