1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6  */
7 
8 #ifndef INCLUDED_XML_STRUCTURE_MAPPER_HPP
9 #define INCLUDED_XML_STRUCTURE_MAPPER_HPP
10 
11 #include "orcus/xml_structure_tree.hpp"
12 
13 namespace orcus { namespace detail {
14 
15 class xml_structure_mapper
16 {
17     xml_table_range_t m_current_range;
18 
19     xml_structure_tree::range_handler_type m_range_handler;
20     xml_structure_tree::walker m_walker;
21     xml_structure_tree::element m_cur_elem;
22     size_t m_repeat_count;
23 
24     void reset();
25 
26     void traverse();
27 
28     void push_range();
29 
30 public:
31     xml_structure_mapper(xml_structure_tree::range_handler_type rh, const xml_structure_tree::walker& walker);
32 
33     void run();
34 };
35 
36 }}
37 
38 #endif
39 
40 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
41