summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
17fd219)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Id915ba7dbe8128d492d92faa05bbf12770a49f8d
sprintf(uuid_str, LTTNG_UUID_FMT, LTTNG_UUID_FMT_VALUES(uuid));
}
sprintf(uuid_str, LTTNG_UUID_FMT, LTTNG_UUID_FMT_VALUES(uuid));
}
+std::string lttng::utils::uuid_to_str(const lttng_uuid& uuid)
+{
+ std::string uuid_str(LTTNG_UUID_STR_LEN, '\0');
+
+ ::lttng_uuid_to_str(uuid, &uuid_str[0]);
+
+ /* Don't include '\0' in the C++ string. */
+ uuid_str.resize(uuid_str.size() - 1);
+
+ return uuid_str;
+}
+
int lttng_uuid_from_str(const char *str_in, lttng_uuid& uuid_out)
{
int ret = 0;
int lttng_uuid_from_str(const char *str_in, lttng_uuid& uuid_out)
{
int ret = 0;
#include <stdint.h>
#include <inttypes.h>
#include <array>
#include <stdint.h>
#include <inttypes.h>
#include <array>
*/
void lttng_uuid_to_str(const lttng_uuid& uuid, char *uuid_str);
*/
void lttng_uuid_to_str(const lttng_uuid& uuid, char *uuid_str);
+namespace lttng {
+namespace utils {
+std::string uuid_to_str(const lttng_uuid& uuid);
+} /* namespace utils */
+} /* namespace lttng */
+
bool lttng_uuid_is_equal(const lttng_uuid& a, const lttng_uuid& b);
bool lttng_uuid_is_nil(const lttng_uuid& uuid);
bool lttng_uuid_is_equal(const lttng_uuid& a, const lttng_uuid& b);
bool lttng_uuid_is_nil(const lttng_uuid& uuid);