class RInteger : public TInteger |
Public Member Functions | |
---|---|
RInteger (void) | |
RInteger (const RInteger &) | |
IMPORT_C void | CallClose ( TAny *) |
IMPORT_C void | Close (void) |
IMPORT_C RInteger | NewEmptyL ( TUint ) |
IMPORT_C RInteger | NewL (void) |
IMPORT_C RInteger | NewL (const TDesC8 &) |
IMPORT_C RInteger | NewL (const TInteger &) |
IMPORT_C RInteger | NewL ( TInt ) |
IMPORT_C RInteger | NewL ( TUint ) |
IMPORT_C RInteger | NewPrimeL ( TUint , TRandomAttribute ) |
IMPORT_C RInteger | NewRandomL ( TUint , TRandomAttribute ) |
IMPORT_C RInteger | NewRandomL (const TInteger &, const TInteger &) |
IMPORT_C | operator TCleanupItem () |
IMPORT_C RInteger & | operator= (const RInteger &) |
Inherited Enumerations | |
---|---|
TInteger:TRandomAttribute | |
TInteger:TSign |
Inherited Attributes | |
---|---|
TInteger::iPtr | |
TInteger::iSize |
IMPORT_C | RInteger | ( | void | ) |
Creates an RInteger object with no associated internal (heap) storage.
All data members are initialised to zero. It is safe (although not strictly necessary) to push such an RInteger object onto the CleanupStack . This is useful, for example, if you want to pass an RInteger object by reference into a function and have it create the representation of the actual integer for you.
Note that performing any operation on such an RInteger object other than the default assignment operator or copy constructor will panic your code.
void |
IMPORT_C | RInteger | ( | const RInteger & | aInteger | ) |
Copy constructor
This function performs a shallow copy, i.e. the memory holding the integer is not copied.
const RInteger & aInteger |
IMPORT_C void | CallClose | ( | TAny * | aPtr | ) | [static] |
TAny * aPtr | A pointer to the object for which clean-up is to be performed. |
IMPORT_C RInteger | NewEmptyL | ( | TUint | aNumWords | ) | [static] |
Creates a new integer with a preallocated internal storage of aNumWords all initialised to zero.
The resulting RInteger object is logically equivalent to RInteger::NewL(0). The only difference is that the internal storage requirements have been specified to be larger than the default. This is useful if you are about to perform an operation on this integer, that you know the resulting size requirements of, and wish to avoid a heap resize.
TUint aNumWords | The number of words for to preallocated and zero fill. |
IMPORT_C RInteger | NewL | ( | void | ) | [static] |
Creates a new integer representing 0.
void |
IMPORT_C RInteger | NewL | ( | const TDesC8 & | aValue | ) | [static] |
Creates a new integer object representing a specified value.
const TDesC8 & aValue | A descriptor containing the big-endian binary representation of the value. |
IMPORT_C RInteger | NewL | ( | const TInteger & | aInteger | ) | [static] |
Creates an exact copy of an aInteger object.
const TInteger & aInteger | The integer you wish to copy |
IMPORT_C RInteger | NewL | ( | TInt | aInteger | ) | [static] |
Creates a new integer from the value represented by aInteger .
TInt aInteger | A signed word sized integer. |
IMPORT_C RInteger | NewL | ( | TUint | aInteger | ) | [static] |
Creates a new integer from the value represented by aInteger .
TUint aInteger | An unsigned word sized integer. |
IMPORT_C RInteger | NewPrimeL | ( | TUint | aBits, |
TRandomAttribute | aAttr = EAllBitsRandom | |||
) | [static] |
Finds a random prime integer in the range of [2, 2^aBits].
This is done by picking a random integer and using that as a starting point for a sequential search for a prime. To verify the primality of number, this algorithm uses a probablistic primality test. This means that it is possible, although extremely improbable, that the number returned is a pseudoprime.
TUint aBits | The number of bits you wish to randomly select your prime from. |
TRandomAttribute aAttr = EAllBitsRandom | Enum specifying whether specific bits in the random number should be set. See TRandomAttribute for more information. |
IMPORT_C RInteger | NewRandomL | ( | TUint | aBits, |
TRandomAttribute | aAttr = EAllBitsRandom | |||
) | [static] |
Creates a random integer uniformly distributed over [0, 2^aBits].
TUint aBits | The number of bits you wish to randomly select. |
TRandomAttribute aAttr = EAllBitsRandom | Enum specifying whether specific bits in the random number should be set. See TRandomAttribute for more information. |
IMPORT_C RInteger | NewRandomL | ( | const TInteger & | aMin, |
const TInteger & | aMax | |||
) | [static] |
Creates a random integer uniformly distributed over [x | min <= x <= max].
IMPORT_C | operator TCleanupItem | ( | ) |
An overloaded TCleanupItem() allowing the RIntegers to be pushed, popped, and destroyed via the CleanupStack like any other CBase derived object.
IMPORT_C RInteger & | operator= | ( | const RInteger & | aInteger | ) |
Assignment operator
This function performs a shallow copy, i.e. the memory holding the integer is not copied.
const RInteger & aInteger |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.