Kea
1.9.9-git
|
This class generates Qids for outgoing queries. More...
#include <qid_gen.h>
Public Member Functions | |
QidGenerator () | |
Default constructor. More... | |
uint16_t | generateQid () |
Generate a Qid. More... | |
void | seed () |
Seeds the QidGenerator (based on the current time) More... | |
Static Public Member Functions | |
static QidGenerator & | getInstance () |
Returns the singleton instance of the QidGenerator. More... | |
This class generates Qids for outgoing queries.
It is implemented as a singleton; the public way to access it is to call getInstance()->generateQid().
It automatically seeds it with the current time when it is first used.
isc::util::random::QidGenerator::QidGenerator | ( | ) |
Default constructor.
It is recommended that getInstance is used rather than creating separate instances of this class.
The constructor automatically seeds the generator with the current time.
Definition at line 30 of file qid_gen.cc.
References seed().
uint16_t isc::util::random::QidGenerator::generateQid | ( | ) |
|
static |
Returns the singleton instance of the QidGenerator.
Returns a reference to the singleton instance of the generator
Definition at line 26 of file qid_gen.cc.
void isc::util::random::QidGenerator::seed | ( | ) |
Seeds the QidGenerator (based on the current time)
This is automatically called by the constructor
Definition at line 37 of file qid_gen.cc.
Referenced by QidGenerator().