TInteger Class Reference
Protected Member Functions |
---|
| TInteger(void) |
void | CleanGrowL(TUint) |
void | CleanNewL(TUint) |
void | CleanResizeL(TUint) |
void | Construct(const TDesC8 &) |
void | Construct(const TInteger &) |
void | Construct(TInt) |
void | Construct(TUint) |
void | ConstructStack(TUint, TUint) |
void | ConstructStack(TUint, const TInteger &) |
TInt
| ConvertToLong(void) |
TUint
| ConvertToUnsignedLong(void) |
void | CreateNewL(TUint) |
void | DivideL(RInteger &, RInteger &, const TInteger &, const TInteger &) |
void | DivideL(TUint &, RInteger &, const TInteger &, TUint) |
TBool
| IsConvertableToLong(void) |
TBool
| IsHeapBased(void) |
TBool
| IsStackBased(void) |
TUint
| Modulo(const TInteger &, TUint) |
RInteger
| PositiveAddL(const TInteger &, const TInteger &) |
void | PositiveDivide(TUint &, TInteger &, const TInteger &, TUint) |
void | PositiveDivideL(RInteger &, RInteger &, const TInteger &, const TInteger &) |
RInteger
| PositiveMultiplyL(const TInteger &, const TInteger &) |
RInteger
| PositiveSubtractL(const TInteger &, const TInteger &) |
void | PrimeRandomizeL(TUint, TRandomAttribute) |
TUint *const | Ptr(void) |
void | RandomizeL(TUint, TRandomAttribute) |
void | RandomizeL(const TInteger &, const TInteger &) |
void | SetHeapBased(void) |
void | SetPtr(TUint *) |
void | SetSign(TSign) |
void | SetSize(TUint) |
void | SetStackBased(void) |
TSign
| Sign(void) |
TUint
| Size(void) |
TBool
| SmallPrimeRandomizeL(void) |
Detailed Description
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
Member Attribute Documentation
Member Enumeration Documentation
Enum TRandomAttribute
Enumerator | Value | Description |
---|
EAllBitsRandom | 0 | |
ETopBitSet | 1 | |
ETop2BitsSet | 2 | |
Enum TSign
Enumerator | Value | Description |
---|
EPositive | 0 | |
ENegative | 1 | |
Constructor & Destructor Documentation
TInteger ( void )
IMPORT_C | TInteger | ( | void | | ) | [protected] |
Member Function Documentation
BitCount ( void )
IMPORT_C TUint | BitCount | ( | void | | ) | const |
Get the number of bits required to represent this RInteger.
Returns: The size of the integer in bits.
BufferLC ( )
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
- KErrNegativeExportNotSupported If this instance is a negative integer.
BufferWithNoTruncationLC ( )
IMPORT_C HBufC8 * | BufferWithNoTruncationLC | ( | ) | const |
ByteCount ( void )
IMPORT_C TUint | ByteCount | ( | void | | ) | const |
Gets the number of bytes required to represent this RInteger.
Returns: The size of the integer in bytes.
CleanGrowL ( TUint )
void | CleanGrowL | ( | TUint | aNewSize | ) | [protected] |
CleanNewL ( TUint )
void | CleanNewL | ( | TUint | aNewSize | ) | [protected] |
CleanResizeL ( TUint )
void | CleanResizeL | ( | TUint | aNewSize | ) | [protected] |
Construct ( const TDesC8 & )
void | Construct | ( | const TDesC8 & | aValue | ) | [protected] |
Construct ( const TInteger & )
void | Construct | ( | const TInteger & | aInteger | ) | [protected] |
Construct ( TInt )
void | Construct | ( | TInt | aInteger | ) | [protected] |
Construct ( TUint )
void | Construct | ( | TUint | aInteger | ) | [protected] |
ConstructStack ( TUint, TUint )
void | ConstructStack | ( | TUint | aWords, |
| TUint | aInteger |
| ) | [protected] |
ConstructStack ( TUint, const TInteger & )
void | ConstructStack | ( | TUint | aWords, |
| const TInteger & | aInteger |
| ) | [protected] |
ConvertToLong ( void )
TInt
| ConvertToLong | ( | void | | ) | const [protected] |
ConvertToLongL ( void )
IMPORT_C TInt | ConvertToLongL | ( | void | | ) | const |
ConvertToUnsignedLong ( void )
TUint
| ConvertToUnsignedLong | ( | void | | ) | const [protected, inline] |
CopyL ( const TInteger &, TBool )
IMPORT_C void | CopyL | ( | const TInteger & | aInteger, |
| TBool | aAllowShrink = ETrue |
| ) | |
CopyL ( const TInt, TBool )
IMPORT_C void | CopyL | ( | const TInt | aInteger, |
| TBool | aAllowShrink = ETrue |
| ) | |
CreateNewL ( TUint )
void | CreateNewL | ( | TUint | aNewSize | ) | [protected] |
DivideL ( RInteger &, RInteger &, const TInteger &, const TInteger & )
DivideL ( TUint &, RInteger &, const TInteger &, TUint )
DividedByL ( const TInteger & )
ExponentiateL ( const TInteger & )
GCDL ( const TInteger & )
InverseModL ( const TInteger & )
IsConvertableToLong ( void )
TBool
| IsConvertableToLong | ( | void | | ) | const [protected] |
IsEven ( )
TBool
| IsEven | ( | ) | const [inline] |
IsHeapBased ( void )
TBool
| IsHeapBased | ( | void | | ) | const [protected, inline] |
IsNegative ( )
TBool
| IsNegative | ( | ) | const [inline] |
IsOdd ( )
TBool
| IsOdd | ( | ) | const [inline] |
IsPositive ( )
TBool
| IsPositive | ( | ) | const [inline] |
IsPrimeL ( void )
IMPORT_C TBool | IsPrimeL | ( | void | | ) | const |
IsStackBased ( void )
TBool
| IsStackBased | ( | void | | ) | const [protected, inline] |
IsZero ( )
TBool
| IsZero | ( | ) | const [inline] |
MinusL ( const TInteger & )
ModularExponentiateL ( const TInteger &, const TInteger &, const TInteger & )
ModularMultiplyL ( const TInteger &, const TInteger &, const TInteger & )
Modulo ( const TInteger &, TUint )
ModuloL ( const TInteger & )
Negate ( void )
IMPORT_C void | Negate | ( | void | | ) | |
NotNegative ( )
TBool
| NotNegative | ( | ) | const [inline] |
NotPositive ( )
TBool
| NotPositive | ( | ) | const [inline] |
NotZero ( )
TBool
| NotZero | ( | ) | const [inline] |
One ( void )
IMPORT_C const TInteger & | One | ( | void | | ) | [static] |
Returns: The TInteger representing one
PlusL ( const TInteger & )
PositiveAddL ( const TInteger &, const TInteger & )
PositiveDivide ( TUint &, TInteger &, const TInteger &, TUint )
PositiveDivideL ( RInteger &, RInteger &, const TInteger &, const TInteger & )
PositiveMultiplyL ( const TInteger &, const TInteger & )
PositiveSubtractL ( const TInteger &, const TInteger & )
PrimeRandomizeL ( TUint, TRandomAttribute )
Ptr ( void )
TUint *const | Ptr | ( | void | | ) | const [protected, inline] |
RandomizeL ( TUint, TRandomAttribute )
RandomizeL ( const TInteger &, const TInteger & )
Set ( const RInteger & )
IMPORT_C void | Set | ( | const RInteger & | aInteger | ) | |
SetBit ( TUint )
IMPORT_C void | SetBit | ( | TUint | aBitPos | ) | |
SetHeapBased ( void )
void | SetHeapBased | ( | void | | ) | [protected, inline] |
SetPtr ( TUint * )
void | SetPtr | ( | TUint * | aPtr | ) | [protected, inline] |
SetSign ( TSign )
void | SetSign | ( | TSign | aSign | ) | [protected, inline] |
SetSize ( TUint )
void | SetSize | ( | TUint | aSize | ) | [protected, inline] |
SetStackBased ( void )
void | SetStackBased | ( | void | | ) | [protected, inline] |
Sign ( void )
TSign
| Sign | ( | void | | ) | const [protected, inline] |
SignedCompare ( const TInteger & )
SignedCompare ( TInt )
IMPORT_C TInt | SignedCompare | ( | TInt | aThat | ) | const |
Size ( void )
TUint
| Size | ( | void | | ) | const [protected, inline] |
SmallPrimeRandomizeL ( void )
TBool
| SmallPrimeRandomizeL | ( | void | | ) | [protected] |
TimesL ( const TInteger & )
Two ( void )
IMPORT_C const TInteger & | Two | ( | void | | ) | [static] |
Returns: The TInteger representing two
UnsignedCompare ( const TInteger & )
WordCount ( void )
IMPORT_C TUint | WordCount | ( | void | | ) | const |
Gets the number of words required to represent this RInteger.
Returns: The size of the integer in words.
Zero ( void )
IMPORT_C const TInteger & | Zero | ( | void | | ) | [static] |
Returns: The TInteger representing zero
operator! ( )
IMPORT_C TBool | operator! | ( | ) | const |
operator!= ( const TInteger & )
operator%= ( const TInteger & )
operator*= ( const TInteger & )
operator+= ( const TInteger & )
operator-= ( const TInteger & )
operator/= ( const TInteger & )
operator< ( const TInteger & )
operator<= ( const TInteger & )
operator== ( const TInteger & )
operator> ( const TInteger & )
operator>= ( const TInteger & )