First public contribution.
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * TStackInteger class implementation
25 #ifndef __STACK_INTEGER_H__
26 #define __STACK_INTEGER_H__
30 /** An integer that can be created on the stack.\n\n
31 * The resulting integers are
32 * fixed in size and any code that tries to modify their memory allocation
33 * will panic. Stack based integers may be modified as long as you can
34 * guarantee that the resulting integer will fit in the current amount of
36 * If you are not sure which integer you want, you want an RInteger.
42 class TStackInteger : public TInteger
45 inline TStackInteger<W>(TUint aInteger) {ConstructStack(W, aInteger);}
46 inline TStackInteger<W>(const TInteger& aInteger) {ConstructStack(W, aInteger);}
51 typedef TStackInteger<2> TStackInteger64;
52 typedef TStackInteger<4> TStackInteger128;
53 typedef TStackInteger<8> TStackInteger256;
54 typedef TStackInteger<16> TStackInteger512;
55 typedef TStackInteger<32> TStackInteger1024;
56 typedef TStackInteger<64> TStackInteger2048;
57 //Don't make them any bigger than this :). The last one is 66 words (264 bytes)
59 #endif // __STACK_INTEGER_H__