Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:29

0001 /*
0002  *              Copyright Andrey Semashev 2016.
0003  * Distributed under the Boost Software License, Version 1.0.
0004  *    (See accompanying file LICENSE_1_0.txt or copy at
0005  *          http://www.boost.org/LICENSE_1_0.txt)
0006  */
0007 /*!
0008  * \file   open_mode.hpp
0009  * \author Andrey Semashev
0010  * \date   01.01.2016
0011  *
0012  * The header defines resource opening modes.
0013  */
0014 
0015 #ifndef BOOST_LOG_UTILITY_OPEN_MODE_HPP_INCLUDED_
0016 #define BOOST_LOG_UTILITY_OPEN_MODE_HPP_INCLUDED_
0017 
0018 #include <boost/log/detail/config.hpp>
0019 #include <boost/log/detail/header.hpp>
0020 
0021 #ifdef BOOST_HAS_PRAGMA_ONCE
0022 #pragma once
0023 #endif
0024 
0025 namespace boost {
0026 
0027 BOOST_LOG_OPEN_NAMESPACE
0028 
0029 namespace open_mode {
0030 
0031 //! Create a new resource; fail if exists already
0032 struct create_only_tag {} const create_only = create_only_tag();
0033 //! Opens an existing resource; fail if not exist
0034 struct open_only_tag {} const open_only = open_only_tag();
0035 //! Creates a new resource or opens an existing one
0036 struct open_or_create_tag {} const open_or_create = open_or_create_tag();
0037 
0038 } // namespace open_mode
0039 
0040 BOOST_LOG_CLOSE_NAMESPACE // namespace log
0041 
0042 } // namespace boost
0043 
0044 #include <boost/log/detail/footer.hpp>
0045 
0046 #endif // BOOST_LOG_UTILITY_OPEN_MODE_HPP_INCLUDED_