Orcus
css_document_tree.hpp
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_ORCUS_CSS_DOCUMENT_TREE_HPP
9 #define INCLUDED_ORCUS_CSS_DOCUMENT_TREE_HPP
10 
11 #include "orcus/css_selector.hpp"
12 #include "orcus/exception.hpp"
13 
14 #include <string>
15 #include <memory>
16 
17 namespace orcus {
18 
22 class ORCUS_DLLPUBLIC css_document_tree
23 {
24  struct impl;
25  std::unique_ptr<impl> mp_impl;
26 
27 public:
28 
30  {
31  public:
32  insertion_error(const std::string& msg);
33  };
34 
35  css_document_tree(const css_document_tree&) = delete;
36 
40 
41  css_document_tree& operator=(css_document_tree&& other);
42 
49  void load(std::string_view stream);
50 
60  const css_selector_t& selector,
61  css::pseudo_element_t pseudo_elem,
62  const css_properties_t& props);
63 
75  const css_properties_t* get_properties(
76  const css_selector_t& selector, css::pseudo_element_t pseudo_elem) const;
77 
88  const css_pseudo_element_properties_t*
89  get_all_properties(const css_selector_t& selector) const;
90 
91  void dump() const;
92 
93  void swap(css_document_tree& other) noexcept;
94 };
95 
96 }
97 
98 #endif
99 
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Definition: css_document_tree.hpp:30
Definition: css_document_tree.hpp:23
const css_properties_t * get_properties(const css_selector_t &selector, css::pseudo_element_t pseudo_elem) const
void load(std::string_view stream)
void insert_properties(const css_selector_t &selector, css::pseudo_element_t pseudo_elem, const css_properties_t &props)
const css_pseudo_element_properties_t * get_all_properties(const css_selector_t &selector) const
Definition: exception.hpp:19
Definition: css_selector.hpp:61