Caffa
1.1.0
C++ Application Framework for Embedded Systems with introspection
Core
cafUuidGenerator.h
1
//##################################################################################################
2
//
3
// Custom Visualization Core library
4
// Copyright (C) 2022- Kontur AS
5
//
6
// This library may be used under the terms of the GNU Lesser General Public License as follows:
7
//
8
// GNU Lesser General Public License Usage
9
// This library is free software; you can redistribute it and/or modify
10
// it under the terms of the GNU Lesser General Public License as published by
11
// the Free Software Foundation; either version 2.1 of the License, or
12
// (at your option) any later version.
13
//
14
// This library is distributed in the hope that it will be useful, but WITHOUT ANY
15
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
// FITNESS FOR A PARTICULAR PURPOSE.
17
//
18
// See the GNU Lesser General Public License at <<http://www.gnu.org/licenses/lgpl-2.1.html>>
19
// for more details.
20
//
21
//##################################################################################################
22
#pragma once
23
24
#include <memory>
25
#include <mutex>
26
#include <random>
27
28
namespace
uuids
29
{
30
template
<
typename
GeneratorT>
31
class
basic_uuid_random_generator
;
32
using
uuid_random_generator
=
basic_uuid_random_generator<std::mt19937>
;
33
}
// namespace uuids
34
35
namespace
caffa
36
{
37
class
UuidGenerator
38
{
39
public
:
40
static
std::string generate();
41
42
private
:
43
static
std::unique_ptr<uuids::uuid_random_generator> s_uuidGenerator;
44
static
std::mutex s_mutex;
45
};
46
47
}
// namespace caffa
caffa::UuidGenerator
Definition:
cafUuidGenerator.h:38
uuids::basic_uuid_random_generator
Definition:
cafUuidGenerator.h:31
caffa
Main Caffa namespace.
Definition:
__init__.py:1
Generated by
1.9.1