UUID.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00019 #ifndef UUID_h
00020 #define UUID_h
00021 
00022 #ifdef WITH_ACE
00023 #include <ace/UUID.h>
00024 #else
00025 #include <uuid.h>
00026 #endif
00027 
00042 namespace RTC_Utils
00043 {
00044 #ifdef WITH_ACE
00045   typedef ACE_Utils::UUID UUID;
00046 
00047   class UUID_Generator
00048     : public ACE_Utils::UUID_Generator
00049   {
00050   public:
00051     UUID_Generator() : ACE_Utils::UUID_Generator() {};
00052 #ifndef ACE_5_6_1_OR_EARLIER  
00053     ACE_Utils::UUID*
00054     generateUUID(ACE_UINT16 version=0x0001, u_char variant=0x80)
00055     {
00056       return ACE_Utils::UUID_Generator::generate_UUID(version, variant);
00057     }
00058 #endif
00059   };
00060 #else
00061 
00080   class UUID
00081   {
00082     uuid_t _uuid;
00083   public:
00097     UUID();
00098     
00112     UUID(uuid_t*);
00113     
00131     std::string* to_string();
00132   };
00133   
00153   class UUID_Generator
00154   {
00155   public:
00169     UUID_Generator();
00170     
00184     void init();
00185     
00209     UUID* generateUUID(int n, int h);
00210   };
00211 #endif
00212 };
00213 
00214 #endif // UUID_h

Generated on Wed May 21 05:17:34 2008 for OpenRTM by  doxygen 1.5.3