| 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 fallback_policy_fwd.hpp |
| 9 | * \author Andrey Semashev |
| 10 | * \date 18.08.2012 |
| 11 | * |
| 12 | * The header contains forward declaration of fallback policies when attribute value visitation or extraction fails. |
| 13 | */ |
| 14 | |
| 15 | #ifndef BOOST_LOG_ATTRIBUTES_FALLBACK_POLICY_FWD_HPP_INCLUDED_ |
| 16 | #define BOOST_LOG_ATTRIBUTES_FALLBACK_POLICY_FWD_HPP_INCLUDED_ |
| 17 | |
| 18 | #include <boost/log/detail/config.hpp> |
| 19 | |
| 20 | #ifdef BOOST_HAS_PRAGMA_ONCE |
| 21 | #pragma once |
| 22 | #endif |
| 23 | |
| 24 | namespace boost { |
| 25 | |
| 26 | BOOST_LOG_OPEN_NAMESPACE |
| 27 | |
| 28 | /*! |
| 29 | * The \c fallback_to_none policy results in returning an empty value reference if the attribute value cannot be extracted. |
| 30 | */ |
| 31 | struct fallback_to_none; |
| 32 | |
| 33 | /*! |
| 34 | * The \c fallback_to_throw policy results in throwing an exception if the attribute value cannot be extracted. |
| 35 | */ |
| 36 | struct fallback_to_throw; |
| 37 | |
| 38 | /*! |
| 39 | * The \c fallback_to_default policy results in a default value if the attribute value cannot be extracted. |
| 40 | */ |
| 41 | template< typename DefaultT > |
| 42 | struct fallback_to_default; |
| 43 | |
| 44 | BOOST_LOG_CLOSE_NAMESPACE // namespace log |
| 45 | |
| 46 | } // namespace boost |
| 47 | |
| 48 | #endif // BOOST_LOG_ATTRIBUTES_FALLBACK_POLICY_FWD_HPP_INCLUDED_ |
| 49 | |