SAGA Adaptor CPI v.1.0
|
00001 // Copyright (c) 2005-2009 Hartmut Kaiser 00002 // Copyright (c) 2007 Ole Weidner (oweidner@cct.lsu.edu) 00003 // 00004 // Distributed under the Boost Software License, Version 1.0. (See accompanying 00005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 00006 00007 #ifndef SAGA_SAGA_UUID_HPP 00008 #define SAGA_SAGA_UUID_HPP 00009 00010 // include stl 00011 #include <string> 00012 #include <iosfwd> 00013 00014 // include dependent spec sections 00015 #include <saga/saga/util.hpp> 00016 #include <saga/saga/base.hpp> 00017 00018 // suppress warnings about dependent classes not being exported from the dll 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 // FIXME-AM: how can I otherwise implement the operators in the cpp file? 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); 00045 00046 public: 00051 uuid (void); 00052 00057 uuid (char const * uuid_str); 00058 00063 std::string string (void) const; 00064 00069 friend SAGA_EXPORT bool operator== (const uuid & lhs, const uuid & rhs); 00070 00075 friend SAGA_EXPORT bool operator!= (const uuid & lhs, const uuid & rhs); 00076 00081 friend SAGA_EXPORT bool operator< (const uuid & lhs, const uuid & rhs); 00082 00087 friend SAGA_EXPORT bool operator> (const uuid & lhs, const uuid & rhs); 00088 00093 friend SAGA_EXPORT bool operator<= (const uuid & lhs, const uuid & rhs); 00094 00099 friend SAGA_EXPORT bool operator>= (const uuid & lhs, const uuid & rhs); 00100 00105 friend SAGA_EXPORT std::ostream & operator<< (std::ostream & ostrm, 00106 const uuid & rhs); 00107 00112 friend SAGA_EXPORT std::istream & operator>> (std::istream & istrm, 00113 uuid & rhs); 00114 }; 00115 00116 } // namespace saga 00118 00119 // re-enable warnings about dependent classes not being exported from the dll 00120 #if defined(BOOST_MSVC) 00121 #pragma warning(pop) 00122 #endif 00123 00124 #endif // SAGA_SAGA_UUID_HPP 00125