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  //------------------------------------------------------------
35  : m_uuidstr(0)
36  {
37  }
38 
46  UUID::UUID(const uuid_t& uuid)
47  : m_uuid(uuid), m_uuidstr(0)
48  {
49  }
50 
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  //------------------------------------------------------------
96  {
97  }
106  {
107  }
108 
117  {
118  }
119 
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
~UUID_Generator()
UUID class destructor.
void init()
Initialization.
UUID()
UUID class constructor.
UUID value class.
char * m_uuidstr
coil::UUID * generateUUID(ACE_UINT16 version=0x0001, u_char variant=0x80)
Definition: ace/coil/UUID.h:45
const char * to_string()
Converting from UUID value to string.
UUID_Generator()
UUID class constructor.
Definition: ace/coil/UUID.h:42
~UUID()
UUID class destructor.
Common Object Interface Layer.


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:07:56