#include <bigint.h>
| class TInteger |
| Protected Attributes | |
|---|---|
| TUint | iPtr |
| TUint | iSize |
| Public Member Enumerations | |
|---|---|
| enum | TRandomAttribute { EAllBitsRandom, ETopBitSet, ETop2BitsSet } |
| Protected Member Enumerations | |
|---|---|
| enum | TSign { EPositive, ENegative } |
Abstract base class defining the interface for handling and manipulating big integers.
TInteger is capable of representing both negative and positive integers with an absolute value of less than 2^32^(2^32). To create an integer look at RInteger. TInteger defines an interface for the RInteger implementation - it is not intended that TIntegers be copied or assigned from other TIntegers. On EKA1 platforms, this is possible, but it should be avoided.
See also: RInteger
| TUint | iPtr | [protected] |
| TUint | iSize | [protected] |
| Enumerator | Value | Description |
|---|---|---|
| EAllBitsRandom | 0 | |
| ETopBitSet | 1 | |
| ETop2BitsSet | 2 |
| IMPORT_C | TInteger | ( | void | ) | [protected] |
| IMPORT_C TUint | BitCount | ( | void | ) | const |
Get the number of bits required to represent this RInteger.
| IMPORT_C HBufC8 * | BufferLC | ( | ) | const |
Creates a new buffer containing the big-endian binary representation of this integer.
Note that it does not support the exporting of negative integers.
| Leave Codes | |
|---|---|
| KErrNegativeExportNotSupported | If this instance is a negative integer. |
| IMPORT_C HBufC8 * | BufferWithNoTruncationLC | ( | ) | const |
| IMPORT_C TUint | ByteCount | ( | void | ) | const |
Gets the number of bytes required to represent this RInteger.
| void | CleanGrowL | ( | TUint | aNewSize | ) | [protected] |
| void | CleanNewL | ( | TUint | aNewSize | ) | [protected] |
| void | CleanResizeL | ( | TUint | aNewSize | ) | [protected] |
| void | Construct | ( | const TDesC8 & | aValue | ) | [protected] |
| void | Construct | ( | const TInteger & | aInteger | ) | [protected] |
| void | Construct | ( | TInt | aInteger | ) | [protected] |
| void | Construct | ( | TUint | aInteger | ) | [protected] |
| TInt | ConvertToLong | ( | void | ) | const [protected] |
| IMPORT_C TInt | ConvertToLongL | ( | void | ) | const |
| TUint | ConvertToUnsignedLong | ( | void | ) | const [protected, inline] |
| void | CreateNewL | ( | TUint | aNewSize | ) | [protected] |
| void | DivideL | ( | RInteger & | aRemainder, |
| RInteger & | aQuotient, | |||
| const TInteger & | aDividend, | |||
| const TInteger & | aDivisor | |||
| ) | const [protected] | |||
| void | DivideL | ( | TUint & | aRemainder, |
| RInteger & | aQoutient, | |||
| const TInteger & | aDividend, | |||
| TUint | aDivisor | |||
| ) | const [protected] | |||
| TBool | IsConvertableToLong | ( | void | ) | const [protected] |
| TBool | IsEven | ( | ) | const [inline] |
| TBool | IsHeapBased | ( | void | ) | const [protected, inline] |
| TBool | IsNegative | ( | ) | const [inline] |
| TBool | IsOdd | ( | ) | const [inline] |
| TBool | IsPositive | ( | ) | const [inline] |
| IMPORT_C TBool | IsPrimeL | ( | void | ) | const |
| TBool | IsStackBased | ( | void | ) | const [protected, inline] |
| TBool | IsZero | ( | ) | const [inline] |
| IMPORT_C RInteger | ModularExponentiateL | ( | const TInteger & | aBase, |
| const TInteger & | aExp, | |||
| const TInteger & | aMod | |||
| ) | [static] | |||
| IMPORT_C RInteger | ModularMultiplyL | ( | const TInteger & | aA, |
| const TInteger & | aB, | |||
| const TInteger & | aModulus | |||
| ) | [static] | |||
| IMPORT_C void | Negate | ( | void | ) |
| TBool | NotNegative | ( | ) | const [inline] |
| TBool | NotPositive | ( | ) | const [inline] |
| TBool | NotZero | ( | ) | const [inline] |
| IMPORT_C const TInteger & | One | ( | void | ) | [static] |
Gets the TInteger that represents one
| void | PositiveDivide | ( | TUint & | aRemainder, |
| TInteger & | aQoutient, | |||
| const TInteger & | aDividend, | |||
| TUint | aDivisor | |||
| ) | const [protected] | |||
| void | PositiveDivideL | ( | RInteger & | aRemainder, |
| RInteger & | aQuotient, | |||
| const TInteger & | aDividend, | |||
| const TInteger & | aDivisor | |||
| ) | const [protected] | |||
| void | PrimeRandomizeL | ( | TUint | aBits, |
| TRandomAttribute | aAttr | |||
| ) | [protected] | |||
| TUint *const | Ptr | ( | void | ) | const [protected, inline] |
| void | RandomizeL | ( | TUint | aBits, |
| TRandomAttribute | aAttr | |||
| ) | [protected] | |||
| IMPORT_C void | Set | ( | const RInteger & | aInteger | ) |
| IMPORT_C void | SetBit | ( | TUint | aBitPos | ) |
| void | SetHeapBased | ( | void | ) | [protected, inline] |
| void | SetPtr | ( | TUint * | aPtr | ) | [protected, inline] |
| void | SetSign | ( | TSign | aSign | ) | [protected, inline] |
| void | SetSize | ( | TUint | aSize | ) | [protected, inline] |
| void | SetStackBased | ( | void | ) | [protected, inline] |
| TSign | Sign | ( | void | ) | const [protected, inline] |
| TUint | Size | ( | void | ) | const [protected, inline] |
| TBool | SmallPrimeRandomizeL | ( | void | ) | [protected] |
| IMPORT_C RInteger | SquaredL | ( | void | ) | const |
| IMPORT_C const TInteger & | Two | ( | void | ) | [static] |
Gets the TInteger that represents two
| IMPORT_C TUint | WordCount | ( | void | ) | const |
Gets the number of words required to represent this RInteger.
| IMPORT_C const TInteger & | Zero | ( | void | ) | [static] |
Gets the TInteger that represents zero
| IMPORT_C TBool | operator! | ( | ) | const |
| IMPORT_C TInteger & | operator++ | ( | ) |
| IMPORT_C TInteger & | operator-- | ( | ) |