]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /* |
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) | |
6 | */ | |
7 | /*! | |
8 | * \file process_id.hpp | |
9 | * \author Andrey Semashev | |
10 | * \date 12.09.2009 | |
11 | * | |
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. | |
14 | */ | |
15 | ||
16 | #ifndef BOOST_LOG_DETAIL_PROCESS_ID_HPP_INCLUDED_ | |
17 | #define BOOST_LOG_DETAIL_PROCESS_ID_HPP_INCLUDED_ | |
18 | ||
19 | #include <iosfwd> | |
20 | #include <boost/log/detail/config.hpp> | |
21 | #include <boost/log/detail/id.hpp> | |
22 | #include <boost/log/detail/header.hpp> | |
23 | ||
24 | #ifdef BOOST_HAS_PRAGMA_ONCE | |
25 | #pragma once | |
26 | #endif | |
27 | ||
28 | namespace boost { | |
29 | ||
30 | BOOST_LOG_OPEN_NAMESPACE | |
31 | ||
32 | namespace aux { | |
33 | ||
34 | //! The process id descriptor | |
35 | struct process | |
36 | { | |
37 | typedef unsigned long native_type; | |
38 | typedef boost::log::aux::id< process > id; | |
39 | }; | |
40 | ||
41 | namespace this_process { | |
42 | ||
43 | //! The function returns current process identifier | |
44 | BOOST_LOG_API process::id get_id(); | |
45 | ||
46 | } // namespace this_process | |
47 | ||
48 | template< typename CharT, typename TraitsT > | |
49 | BOOST_LOG_API std::basic_ostream< CharT, TraitsT >& | |
50 | operator<< (std::basic_ostream< CharT, TraitsT >& strm, process::id const& pid); | |
51 | ||
52 | } // namespace aux | |
53 | ||
54 | BOOST_LOG_CLOSE_NAMESPACE // namespace log | |
55 | ||
56 | } // namespace boost | |
57 | ||
58 | #include <boost/log/detail/footer.hpp> | |
59 | ||
60 | #endif // BOOST_LOG_DETAIL_PROCESS_ID_HPP_INCLUDED_ |