BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
Uuid-Utility.h
1
2// Name: Uuid-Utility.h
3// Purpose: Utilities for the generation of the Uuids.
4// Author: Paul McGrath
5// Modified by:
6// Created:
7// Copyright: (c) Paul McGrath
8// Licence: CC licence
10#pragma once
11
12#include <boost/uuid/uuid.hpp>
13#include <boost/uuid/uuid_generators.hpp>
14#include <boost/uuid/uuid_io.hpp>
15
16
17//creating a uuid class that
18// initializes the uuid in the constructor
19// using a defined mechanism
20
21namespace bellshire{
22
23class uuid_class : public boost::uuids::uuid
24{
25public:
27 : boost::uuids::uuid(boost::uuids::random_generator()())
28 {}
29
30 explicit uuid_class(boost::uuids::uuid const& u)
31 : boost::uuids::uuid(u)
32 {}
33
34 operator boost::uuids::uuid() {
35 return static_cast<boost::uuids::uuid&>(*this);
36 }
37
38 operator boost::uuids::uuid() const {
39 return static_cast<boost::uuids::uuid const&>(*this);
40 }
41};
42
43// Usage
44// uuid_class u1;
45// uuid_class u2;
46//
47// assert(u1 != u2);
48
49}//namespace bellshire
Definition: Uuid-Utility.h:24
Contains the GUI and GUI associated classes. OnInit() calls the creation of the MaterialFrame GUI
Definition: BT_MatML_App.h:39