random Class Reference

Pseudo-random number generator. More...

List of all members.

Static Public Member Functions

static unsigned int getNext ()
static unsigned int getTime ()
static unsigned int getProcess ()
static const string getString (const int length, const string &randomChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")

Static Protected Attributes

static unsigned int m_next

Detailed Description

Pseudo-random number generator.


Member Function Documentation

unsigned int getNext (  )  [static]

Return a new random number.

Returns:
random number

References random::m_next.

Referenced by body::generateRandomBoundaryString(), and random::getString().

unsigned int getProcess (  )  [static]

Return the current process number (may be user to build "random" strings).

Returns:
process number

References platform::getHandler().

const string getString ( const int  length,
const string randomChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 
) [static]

Return a random character string with the specified length.

Parameters:
length length of the string to generate
randomChars list of characters to use
Returns:
random string

References random::getNext().

unsigned int getTime (  )  [static]

Return the current time as a number (may be used to build "random" strings).

Returns:
time as a number

References platform::getHandler().

Referenced by body::generateRandomBoundaryString().


Member Data Documentation

unsigned int m_next [static, protected]

Referenced by random::getNext().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2