Public Member Functions | |
OFFilenameCreator () | |
default constructor | |
OFFilenameCreator (const OFFilenameCreator ©) | |
copy constructor | |
virtual | ~OFFilenameCreator () |
destructor | |
OFFilenameCreator & | operator= (const OFFilenameCreator ©) |
assignment operator | |
OFBool | makeFilename (unsigned int seed, const char *dir, const char *prefix, const char *postfix, OFString &filename) |
creates a new unique filename. | |
Static Public Member Functions | |
static unsigned int | hashString (const char *str) |
creates hash value. | |
static int | myrand_r (unsigned int *seed) |
simple but thread safe random number generator. | |
Static Private Member Functions | |
static void | addLongToString (unsigned long l, OFString &s) |
appends the lower 32 bit of the given number to the given string. | |
Private Attributes | |
unsigned long | creation_time |
date/time of creation of this object |
Definition at line 43 of file offname.h.
|
appends the lower 32 bit of the given number to the given string. Always appends exactly 8 digits (padded with leading zeroes).
|
|
creates hash value. (i.e. random seed) from character string.
|
|
creates a new unique filename.
|
|
simple but thread safe random number generator. The interface is derived from the Posix rand_r function. Uses a multiplicative congruential random-number generator with period 2**32 that returns successive pseudo-random numbers in the range of 0 to 0x7fffffff.
|