1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/textandloc/textrendering/texthandling/sfields/FLDNUMS.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,76 @@
1.4 +/*
1.5 +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef __FLDNUMS_H__
1.23 +#define __FLDNUMS_H__
1.24 +
1.25 +#include <e32std.h>
1.26 +
1.27 +class TDeneryToCharBase
1.28 +/**
1.29 +@internalComponent
1.30 +*/
1.31 + {
1.32 +public:
1.33 + IMPORT_C TInt DeneryToChar(TPtr& aBuf,TInt aDenery)const;
1.34 +protected:
1.35 + virtual TInt NumChars(TInt aDenery)const=0;
1.36 + virtual void DoDeneryToChar(TPtr& aBuf,TInt aDenery)const=0;
1.37 + };
1.38 +
1.39 +
1.40 +class TRomanNumeral : public TDeneryToCharBase
1.41 +/**
1.42 +@internalComponent
1.43 +*/
1.44 + {
1.45 +public:
1.46 +
1.47 +protected:
1.48 + IMPORT_C TInt NumChars(TInt aDenery)const;
1.49 + IMPORT_C void DoDeneryToChar(TPtr& aBuf,TInt aDenery)const;
1.50 + };
1.51 +
1.52 +
1.53 +class TArabicNumeral : public TDeneryToCharBase
1.54 +/**
1.55 +@internalComponent
1.56 +*/
1.57 + {
1.58 +protected:
1.59 + IMPORT_C TInt NumChars(TInt aDenery)const;
1.60 + IMPORT_C void DoDeneryToChar(TPtr& aBuf,TInt aDenery)const;
1.61 + };
1.62 +
1.63 +
1.64 +class TAlphabeticNumeral : public TDeneryToCharBase
1.65 +/**
1.66 +@internalComponent
1.67 +*/
1.68 + {
1.69 +public:
1.70 +
1.71 +protected:
1.72 + IMPORT_C TInt NumChars(TInt aDenery)const;
1.73 + IMPORT_C void DoDeneryToChar(TPtr& aBuf,TInt aDenery)const;
1.74 +private:
1.75 + void PropendDigitAsChar(TPtr& aValueText,TInt aDigit)const;
1.76 + };
1.77 +
1.78 +
1.79 +#endif