from_stream.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 from_stream.hpp
  9. * \author Andrey Semashev
  10. * \date 22.03.2008
  11. *
  12. * The header contains definition of facilities that allows to initialize the library from a
  13. * settings file.
  14. */
  15. #ifndef BOOST_LOG_UTILITY_SETUP_FROM_STREAM_HPP_INCLUDED_
  16. #define BOOST_LOG_UTILITY_SETUP_FROM_STREAM_HPP_INCLUDED_
  17. #include <iosfwd>
  18. #include <boost/log/detail/setup_config.hpp>
  19. #include <boost/log/detail/header.hpp>
  20. #ifdef BOOST_HAS_PRAGMA_ONCE
  21. #pragma once
  22. #endif
  23. namespace boost {
  24. BOOST_LOG_OPEN_NAMESPACE
  25. /*!
  26. * The function initializes the logging library from a stream containing logging settings
  27. *
  28. * \param strm Stream, that provides library settings
  29. *
  30. * \b Throws: An <tt>std::exception</tt>-based exception if the read data cannot be interpreted as the library settings
  31. */
  32. template< typename CharT >
  33. BOOST_LOG_SETUP_API void init_from_stream(std::basic_istream< CharT >& strm);
  34. BOOST_LOG_CLOSE_NAMESPACE // namespace log
  35. } // namespace boost
  36. #include <boost/log/detail/footer.hpp>
  37. #endif // BOOST_LOG_UTILITY_SETUP_FROM_STREAM_HPP_INCLUDED_