1 /*============================================================================= 2 Copyright (c) 2002 2004 2006 Joel de Guzman 3 Copyright (c) 2004 Eric Niebler 4 Copyright (c) 2011 Daniel James 5 6 Use, modification and distribution is subject to the Boost Software 7 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 8 http://www.boost.org/LICENSE_1_0.txt) 9 =============================================================================*/ 10 #if !defined(BOOST_SPIRIT_ACTIONS_STATE_HPP) 11 #define BOOST_SPIRIT_ACTIONS_STATE_HPP 12 13 #include "state.hpp" 14 15 namespace quickbook 16 { 17 // State savers 18 // 19 // Defined in state.cpp 20 21 struct state_save 22 { 23 enum scope_flags 24 { 25 scope_none = 0, 26 scope_macros = 1, 27 scope_templates = 2, 28 scope_output = 4, 29 scope_callables = scope_macros + scope_templates, 30 scope_all = scope_callables + scope_output 31 }; 32 33 explicit state_save(quickbook::state&, scope_flags); 34 ~state_save(); 35 36 quickbook::state& state; 37 scope_flags scope; 38 unsigned qbk_version; 39 bool imported; 40 std::string doc_type; 41 file_ptr current_file; 42 quickbook_path current_path; 43 fs::path xinclude_base; 44 source_mode_info source_mode; 45 string_symbols macro; 46 int template_depth; 47 int min_section_level; 48 49 private: 50 state_save(state_save const&); 51 state_save& operator=(state_save const&); 52 }; 53 } 54 55 #endif // BOOST_SPIRIT_ACTIONS_STATE_HPP 56