Encapsulates the generation and handling of UUIDs.
More...
#include <UUID.h>
|
static boost::uuids::nil_generator | nilGen |
|
static boost::uuids::basic_random_generator< boost::mt19937 > | randomGen |
|
Encapsulates the generation and handling of UUIDs.
- Author
- swrede
Definition at line 46 of file UUID.h.
rsc::misc::UUID::UUID |
( |
const bool & |
random = true | ) |
|
|
explicit |
Creates a new UUID object that is either random or the nil UUID.
- Parameters
-
random | If true , a random UUID is created. Otherwise the nil UUID is created. |
Definition at line 44 of file UUID.cpp.
References randomGen.
rsc::misc::UUID::UUID |
( |
const std::string & |
uuid | ) |
|
|
explicit |
Parses a UUID from a string.
Various default formats are accepted.
- Parameters
-
uuid | A string representation of the desired UUID. |
- Exceptions
-
std::runtime_error | given string is not acceptable as a UUID |
Definition at line 51 of file UUID.cpp.
rsc::misc::UUID::UUID |
( |
const char * |
uuid | ) |
|
|
explicit |
Parses a UUID from a string.
Various default formats are accepted.
- Parameters
-
uuid | A string representation of the desired UUID. |
- Exceptions
-
std::runtime_error | given string is not acceptable as a UUID |
Definition at line 58 of file UUID.cpp.
rsc::misc::UUID::UUID |
( |
boost::uint8_t * |
data | ) |
|
|
explicit |
Generates a uuid from the given 16 byte representation.
- Parameters
-
data | 16 byte representation of a uuid |
Definition at line 65 of file UUID.cpp.
rsc::misc::UUID::UUID |
( |
const UUID & |
ns, |
|
|
const std::string & |
name |
|
) |
| |
Generates a uuid for name in namespace ns.
- Parameters
-
ns | Namespace in which name should be placed. |
name | A unique name within namespace ns. |
Definition at line 69 of file UUID.cpp.
rsc::misc::UUID::~UUID |
( |
| ) |
|
|
virtual |
boost::uuids::uuid rsc::misc::UUID::getId |
( |
| ) |
const |
Returns the contained UUID on boost format.
- Returns
- uuid in boost format.
Definition at line 76 of file UUID.cpp.
References id.
string rsc::misc::UUID::getIdAsString |
( |
| ) |
const |
Returns a string representing the UUID.
- Returns
- string representation of the UUID
Definition at line 80 of file UUID.cpp.
References id.
bool rsc::misc::UUID::operator!= |
( |
const UUID & |
other | ) |
const |
bool rsc::misc::UUID::operator< |
( |
const UUID & |
other | ) |
const |
bool rsc::misc::UUID::operator== |
( |
const UUID & |
other | ) |
const |
RSC_EXPORT std::ostream& operator<< |
( |
std::ostream & |
stream, |
|
|
const UUID & |
id |
|
) |
| |
|
friend |
boost::uuids::uuid rsc::misc::UUID::id |
|
private |
boost::uuids::nil_generator rsc::misc::UUID::nilGen |
|
staticprivate |
Initial value:=
boost::uuids::nil_generator()
Definition at line 119 of file UUID.h.
boost::uuids::basic_random_generator< boost::mt19937 > rsc::misc::UUID::randomGen |
|
staticprivate |
Initial value:=
boost::uuids::basic_random_generator<boost::mt19937>()
Definition at line 120 of file UUID.h.
Referenced by UUID().
The documentation for this class was generated from the following files: