summaryrefslogtreecommitdiff
path: root/project2/uuid.h
blob: 4c60ae5ed34709de3eda29dbb1ef05506be14267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef UUID_H
#define UUID_H

#include <iostream>

#ifndef uuid_impl
class uuid_impl;
#endif

class UUID {
	public:
		UUID();
		~UUID();
		UUID(const UUID &);
		UUID(const std::string &);

		static UUID generate_random();

		UUID & operator=(const UUID & other);
		UUID & operator=(const std::string &);

		bool operator!=(const UUID & other) const;
		bool is_nil() const;

		std::string str() const;

	private:
		uuid_impl * _uuid;
};

#endif