src
lib
coil
win32
coil
win32/coil/UUID.cpp
Go to the documentation of this file.
1
// -*- C++ -*-
20
#include <coil/UUID.h>
21
22
namespace
coil
23
{
24
//------------------------------------------------------------
25
// UUID class
26
//------------------------------------------------------------
34
UUID::UUID
()
35
: m_uuidstr(0)
36
{
37
}
38
46
UUID::UUID
(
const
uuid_t&
uuid
)
47
:
m_uuid
(uuid),
m_uuidstr
(0)
48
{
49
}
50
58
UUID::~UUID
()
59
{
60
::RpcStringFreeA((RPC_CSTR*)&
m_uuidstr
);
61
}
62
70
const
char
*
UUID::to_string
()
71
{
72
if
(::UuidToStringA(&
m_uuid
, (RPC_CSTR*)&
m_uuidstr
)
73
!= RPC_S_OK)
74
{
75
return
0;
76
}
77
else
78
{
79
return
m_uuidstr
;
80
}
81
}
82
83
//------------------------------------------------------------
84
// UUID_Generator class
85
//------------------------------------------------------------
95
UUID_Generator::UUID_Generator
()
96
{
97
}
105
UUID_Generator::~UUID_Generator
()
106
{
107
}
108
116
void
UUID_Generator::init
()
117
{
118
}
119
127
UUID
*
UUID_Generator::generateUUID
(
int
n,
int
h)
128
{
129
uuid_t
uuid
;
130
if
(::UuidCreate(&uuid) != RPC_S_OK)
131
{
132
return
0;
133
}
134
else
135
{
136
return
new
UUID
(uuid);
137
}
138
}
139
};
// coil
coil::UUID_Generator::~UUID_Generator
~UUID_Generator()
UUID class destructor.
Definition:
win32/coil/UUID.cpp:105
coil::UUID_Generator::init
void init()
Initialization.
Definition:
win32/coil/UUID.cpp:116
coil::UUID::UUID
UUID()
UUID class constructor.
Definition:
win32/coil/UUID.cpp:34
coil::UUID
UUID value class.
Definition:
win32/coil/UUID.h:43
coil::UUID::m_uuidstr
char * m_uuidstr
Definition:
win32/coil/UUID.h:92
coil::UUID::m_uuid
uuid_t m_uuid
Definition:
win32/coil/UUID.h:91
coil::UUID_Generator::generateUUID
coil::UUID * generateUUID(ACE_UINT16 version=0x0001, u_char variant=0x80)
Definition:
ace/coil/UUID.h:45
coil::UUID::to_string
const char * to_string()
Converting from UUID value to string.
Definition:
win32/coil/UUID.cpp:70
uuid
Definition:
src/lib/coil/build/uuid.py:1
coil::UUID_Generator::UUID_Generator
UUID_Generator()
UUID class constructor.
Definition:
ace/coil/UUID.h:42
coil::UUID::~UUID
~UUID()
UUID class destructor.
Definition:
win32/coil/UUID.cpp:58
coil
Common Object Interface Layer.
Definition:
ace/coil/Condition.cpp:22
openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:45