2 * Copyright Andrey Semashev 2007 - 2015.
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
9 * \author Andrey Semashev
12 * \brief This header is the Boost.Log library implementation, see the library documentation
13 * at http://www.boost.org/doc/libs/release/libs/log/doc/html/index.html.
16 #ifndef BOOST_LOG_DETAIL_ID_HPP_INCLUDED_
17 #define BOOST_LOG_DETAIL_ID_HPP_INCLUDED_
19 #include <boost/log/detail/config.hpp>
20 #include <boost/log/detail/header.hpp>
22 #ifdef BOOST_HAS_PRAGMA_ONCE
28 BOOST_LOG_OPEN_NAMESPACE
32 //! Generic identifier class
33 template< typename DescriptorT >
37 //! Native type of the process id
38 typedef typename DescriptorT::native_type native_type;
41 native_type m_NativeID;
44 BOOST_CONSTEXPR id() BOOST_NOEXCEPT : m_NativeID(0) {}
46 explicit id(native_type native) BOOST_NOEXCEPT : m_NativeID(native) {}
48 native_type native_id() const BOOST_NOEXCEPT { return m_NativeID; }
50 bool operator== (id const& that) const BOOST_NOEXCEPT
52 return (m_NativeID == that.m_NativeID);
54 bool operator!= (id const& that) const BOOST_NOEXCEPT
56 return (m_NativeID != that.m_NativeID);
58 bool operator< (id const& that) const BOOST_NOEXCEPT
60 return (m_NativeID < that.m_NativeID);
62 bool operator> (id const& that) const BOOST_NOEXCEPT
64 return (m_NativeID > that.m_NativeID);
66 bool operator<= (id const& that) const BOOST_NOEXCEPT
68 return (m_NativeID <= that.m_NativeID);
70 bool operator>= (id const& that) const BOOST_NOEXCEPT
72 return (m_NativeID >= that.m_NativeID);
78 BOOST_LOG_CLOSE_NAMESPACE // namespace log
82 #include <boost/log/detail/footer.hpp>
84 #endif // BOOST_LOG_DETAIL_ID_HPP_INCLUDED_