info_parser_writer_settings.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // ----------------------------------------------------------------------------
  2. // Copyright (C) 2002-2006 Marcin Kalicinski
  3. // Copyright (C) 2007 Alexey Baskakov
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. // (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // For more information, see www.boost.org
  10. // ----------------------------------------------------------------------------
  11. #ifndef BOOST_PROPERTY_TREE_DETAIL_INFO_PARSER_WRITER_SETTINGS_HPP_INCLUDED
  12. #define BOOST_PROPERTY_TREE_DETAIL_INFO_PARSER_WRITER_SETTINGS_HPP_INCLUDED
  13. #include <string>
  14. namespace boost { namespace property_tree { namespace info_parser
  15. {
  16. template <class Ch>
  17. class info_writer_settings
  18. {
  19. public:
  20. info_writer_settings(Ch indent_char = Ch(' '), unsigned indent_count = 4):
  21. indent_char(indent_char),
  22. indent_count(indent_count)
  23. {
  24. }
  25. Ch indent_char;
  26. int indent_count;
  27. };
  28. template <class Ch>
  29. info_writer_settings<Ch> info_writer_make_settings(Ch indent_char = Ch(' '), unsigned indent_count = 4)
  30. {
  31. return info_writer_settings<Ch>(indent_char, indent_count);
  32. }
  33. } } }
  34. #endif