graphicstools/bitmapfonttools/inc/RECORD.H
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 /*
       
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 * Header RECORD.H
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __RECORD_H__
       
    21 #define __RECORD_H__
       
    22 
       
    23 #include "LEXICAL.H"
       
    24 #include "LST.H"
       
    25 #include "STRNG.H"
       
    26 
       
    27 /**
       
    28 @file
       
    29 @publishedAll
       
    30 */
       
    31 
       
    32 const boolean Proportional = 1; /**< WARNING: Constant for internal use ONLY.  Compatibility is not guaranteed in future releases. */
       
    33 const boolean Serif = 2; /**< WARNING: Constant for internal use ONLY.  Compatibility is not guaranteed in future releases. */
       
    34 const boolean Symbol = 4; /**< WARNING: Constant for internal use ONLY.  Compatibility is not guaranteed in future releases. */
       
    35 
       
    36 /**
       
    37 @publishedAll
       
    38 WARNING: Function for internal use ONLY.  Compatibility is not guaranteed in future releases.
       
    39 */
       
    40 inline void ExternalizeStreamOff(ostream& out, streamoff aOffset)
       
    41 	{
       
    42 	// This will limit the file to 4gig.
       
    43 	// Need to change this if all compilers support file size greater than 4gig.
       
    44 	uint32 offset = static_cast<uint32>(aOffset);
       
    45 	out.write(reinterpret_cast<char*>(&offset), sizeof(offset));
       
    46 	}
       
    47 
       
    48 class Record
       
    49 /**
       
    50 @publishedAll
       
    51 WARNING: Class for internal use ONLY.  Compatibility is not guaranteed in future releases.
       
    52 */
       
    53 	{
       
    54 public:
       
    55 	IMPORT_C Record();
       
    56 	virtual void Externalize(ostream& out) = 0;
       
    57 	virtual void ExternalizeComponents(ostream&){};
       
    58 public:
       
    59 	String iLabel;
       
    60 	streampos iStreamId;
       
    61 	};
       
    62 
       
    63 class RecordList : public ObjectList<Record*>
       
    64 /**
       
    65 @publishedAll
       
    66 WARNING: Class for internal use ONLY.  Compatibility is not guaranteed in future releases.
       
    67 */
       
    68 	{
       
    69 public:
       
    70 	void ExternalizeIds(ostream& out);
       
    71 	void Externalize(ostream& out);
       
    72 	void ExternalizeComponents(ostream& out);
       
    73 	IMPORT_C void Add(Record* aRecord);
       
    74 	IMPORT_C Record *LabelToRecord(const String& aLabel);
       
    75 	IMPORT_C void Destroy();
       
    76 	IMPORT_C ~RecordList();
       
    77 	};
       
    78 
       
    79 class Typeface
       
    80 /**
       
    81 @publishedAll
       
    82 WARNING: Class for internal use ONLY.  Compatibility is not guaranteed in future releases.
       
    83 */
       
    84 	{
       
    85 public:
       
    86 	IMPORT_C Typeface();
       
    87 	void Externalize(ostream& out);
       
    88 public:
       
    89 	String iName;
       
    90 	boolean iFlags;
       
    91 	};
       
    92 
       
    93 class Point
       
    94 /**
       
    95 @publishedAll
       
    96 WARNING: Class for internal use ONLY.  Compatibility is not guaranteed in future releases.
       
    97 */
       
    98 	{
       
    99 public:
       
   100 	void Externalize(ostream& out);
       
   101 public:
       
   102 	int32 iX;
       
   103 	int32 iY;
       
   104 	};
       
   105 
       
   106 #endif
       
   107