8#ifndef INCLUDED_ORCUS_XML_STRUCTURE_TREE_HPP
9#define INCLUDED_ORCUS_XML_STRUCTURE_TREE_HPP
23struct ORCUS_DLLPUBLIC xml_table_range_t
25 std::vector<std::string> paths;
26 std::vector<std::string> row_groups;
29 xml_table_range_t(
const xml_table_range_t& other);
30 xml_table_range_t(xml_table_range_t&& other)
noexcept;
33 xml_table_range_t& operator=(xml_table_range_t other)
noexcept;
35 void swap(xml_table_range_t& other)
noexcept;
44class ORCUS_DLLPUBLIC xml_structure_tree
47 std::unique_ptr<impl> mp_impl;
50 xml_structure_tree() =
delete;
51 xml_structure_tree(
const xml_structure_tree&) =
delete;
52 xml_structure_tree& operator= (
const xml_structure_tree&) =
delete;
79 struct ORCUS_DLLPUBLIC entity_name
82 std::string_view name;
85 entity_name(xmlns_id_t _ns, std::string_view _name);
87 bool operator< (
const entity_name& r)
const;
88 bool operator== (
const entity_name& r)
const;
90 struct ORCUS_DLLPUBLIC
hash
92 size_t operator ()(
const entity_name& val)
const;
96 typedef std::vector<entity_name> entity_names_type;
98 struct ORCUS_DLLPUBLIC element
105 element(
const entity_name& _name,
bool _repeat,
bool _has_content);
113 class ORCUS_DLLPUBLIC walker
115 friend class xml_structure_tree;
117 std::unique_ptr<walker_impl> mp_impl;
119 walker(
const xml_structure_tree::impl& parent_impl);
122 walker(
const walker& r);
124 walker& operator= (
const walker& r);
189 std::string get_xmlns_short_name(xmlns_id_t ns)
const;
209 xml_structure_tree(xml_structure_tree&& other);
210 ~xml_structure_tree();
221 void parse(std::string_view s);
223 void dump_compact(std::ostream& os)
const;
225 walker get_walker()
const;
227 void process_ranges(range_handler_type rh)
const;
229 void swap(xml_structure_tree& other);
Definition xml_structure_tree.hpp:114
entity_names_type get_attributes()
element move_to(const std::string &path)
element descend(const entity_name &name)
entity_names_type get_children()
std::string get_path() const
size_t get_xmlns_index(xmlns_id_t ns) const
std::string to_string(const entity_name &name) const
std::function< void(std::any)> callback_handler_type
Definition xml_structure_tree.hpp:75
void set_callback(callback_type type, callback_handler_type callback)
callback_type
Definition xml_structure_tree.hpp:58
Definition xml_namespace.hpp:100
Definition xml_structure_tree.hpp:99
Definition xml_structure_tree.hpp:91
Definition xml_structure_tree.hpp:80
Definition xml_structure_tree.hpp:24