2 * Copyright Andrey Semashev 2016.
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 * The header defines resource opening modes.
15 #ifndef BOOST_LOG_UTILITY_OPEN_MODE_HPP_INCLUDED_
16 #define BOOST_LOG_UTILITY_OPEN_MODE_HPP_INCLUDED_
18 #include <boost/log/detail/config.hpp>
19 #include <boost/log/detail/header.hpp>
21 #ifdef BOOST_HAS_PRAGMA_ONCE
27 BOOST_LOG_OPEN_NAMESPACE
31 //! Create a new resource; fail if exists already
32 struct create_only_tag {} const create_only = create_only_tag();
33 //! Opens an existing resource; fail if not exist
34 struct open_only_tag {} const open_only = open_only_tag();
35 //! Creates a new resource or opens an existing one
36 struct open_or_create_tag {} const open_or_create = open_or_create_tag();
38 } // namespace open_mode
40 BOOST_LOG_CLOSE_NAMESPACE // namespace log
44 #include <boost/log/detail/footer.hpp>
46 #endif // BOOST_LOG_UTILITY_OPEN_MODE_HPP_INCLUDED_