textrendering/texthandling/sfields/FLDNUMS.H
changeset 32 8b9155204a54
parent 0 1fb32624e06b
equal deleted inserted replaced
31:b9ad20498fb4 32:8b9155204a54
       
     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 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __FLDNUMS_H__
       
    20 #define __FLDNUMS_H__
       
    21 
       
    22 #include <e32std.h>
       
    23 
       
    24 class TDeneryToCharBase
       
    25 /**
       
    26 @internalComponent
       
    27 */
       
    28 	{
       
    29 public:
       
    30 	IMPORT_C TInt DeneryToChar(TPtr& aBuf,TInt aDenery)const;
       
    31 protected:
       
    32 	virtual TInt NumChars(TInt aDenery)const=0; 
       
    33 	virtual void DoDeneryToChar(TPtr& aBuf,TInt aDenery)const=0;
       
    34 	};
       
    35 
       
    36 
       
    37 class TRomanNumeral : public TDeneryToCharBase
       
    38 /**
       
    39 @internalComponent
       
    40 */
       
    41 	{
       
    42 public:
       
    43 
       
    44 protected:
       
    45 	IMPORT_C TInt NumChars(TInt aDenery)const; 
       
    46 	IMPORT_C void DoDeneryToChar(TPtr& aBuf,TInt aDenery)const;
       
    47 	};
       
    48 
       
    49 
       
    50 class TArabicNumeral : public TDeneryToCharBase
       
    51 /**
       
    52 @internalComponent
       
    53 */
       
    54 	{
       
    55 protected:
       
    56 	IMPORT_C TInt NumChars(TInt aDenery)const;
       
    57 	IMPORT_C void DoDeneryToChar(TPtr& aBuf,TInt aDenery)const;
       
    58 	};
       
    59 
       
    60 
       
    61 class TAlphabeticNumeral : public TDeneryToCharBase
       
    62 /**
       
    63 @internalComponent
       
    64 */
       
    65 	{
       
    66 public:
       
    67 
       
    68 protected:
       
    69 	IMPORT_C TInt NumChars(TInt aDenery)const;
       
    70 	IMPORT_C void DoDeneryToChar(TPtr& aBuf,TInt aDenery)const;
       
    71 private:
       
    72 	void PropendDigitAsChar(TPtr& aValueText,TInt aDigit)const;
       
    73 	};
       
    74 
       
    75 
       
    76 #endif