mirror of https://github.com/Icinga/icinga2.git
parent
6721f681e2
commit
7c65757219
|
@ -131,6 +131,9 @@ using std::type_info;
|
|||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/uuid/uuid.hpp>
|
||||
#include <boost/uuid/uuid_generators.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
|
||||
using boost::shared_ptr;
|
||||
using boost::weak_ptr;
|
||||
|
|
|
@ -373,3 +373,19 @@ Utility::LoadIcingaLibrary(const String& library, bool module)
|
|||
|
||||
return hModule;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a new UUID.
|
||||
*
|
||||
* @returns The new UUID in text form.
|
||||
*/
|
||||
String Utility::NewUUID(void)
|
||||
{
|
||||
boost::uuids::uuid uuid = boost::uuids::random_generator()();
|
||||
|
||||
stringstream us;
|
||||
us << uuid;
|
||||
|
||||
return us.str();
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,8 @@ public:
|
|||
|
||||
static void Sleep(double timeout);
|
||||
|
||||
static String NewUUID(void);
|
||||
|
||||
static
|
||||
#ifdef _WIN32
|
||||
HMODULE
|
||||
|
|
Loading…
Reference in New Issue