- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Search for |

# uuid.hpp

Go to the documentation of this file.

    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,
    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 } // namespace saga
    00119
    00120 // re-enable warnings about dependent classes not being exported from the dll
    00121 #if defined(BOOST_MSVC)
    00122 #pragma warning(pop)
    00123 #endif
    00124
    00125 #endif // SAGA_SAGA_UUID_HPP
    00126