00001
00002
00003
00004
00005
00006
00007 #ifndef SAGA_SAGA_UUID_HPP
00008 #define SAGA_SAGA_UUID_HPP
00009
00010
00011 #include <string>
00012 #include <iosfwd>
00013
00014
00015 #include <saga/saga/util.hpp>
00016 #include <saga/saga/base.hpp>
00017
00018
00019 #if defined(BOOST_MSVC)
00020 #pragma warning(push)
00021 #pragma warning(disable: 4251 4231 4275 4660)
00022 #endif
00023
00025 namespace saga {
00030 class SAGA_EXPORT uuid
00031 {
00032
00033 private:
00035
00036 TR1::shared_ptr <saga::impl::uuid> impl_;
00038
00039 protected:
00041
00042 void create (void);
00043 void create (char const * str,
00044 size_t len = 0);
00046
00047 public:
00052 uuid (void);
00053
00058 uuid (char const * uuid_str);
00059
00064 std::string string (void) const;
00065
00070 friend SAGA_EXPORT bool operator== (const uuid & lhs, const uuid & rhs);
00071
00076 friend SAGA_EXPORT bool operator!= (const uuid & lhs, const uuid & rhs);
00077
00082 friend SAGA_EXPORT bool operator< (const uuid & lhs, const uuid & rhs);
00083
00088 friend SAGA_EXPORT bool operator> (const uuid & lhs, const uuid & rhs);
00089
00094 friend SAGA_EXPORT bool operator<= (const uuid & lhs, const uuid & rhs);
00095
00100 friend SAGA_EXPORT bool operator>= (const uuid & lhs, const uuid & rhs);
00101
00106 friend SAGA_EXPORT std::ostream & operator<< (std::ostream & ostrm,
00107 const uuid & rhs);
00108
00113 friend SAGA_EXPORT std::istream & operator>> (std::istream & istrm,
00114 uuid & rhs);
00115 };
00116
00117 }
00119
00120
00121 #if defined(BOOST_MSVC)
00122 #pragma warning(pop)
00123 #endif
00124
00125 #endif // SAGA_SAGA_UUID_HPP
00126