13 class BasicElement :
public std::enable_shared_from_this<BasicElement>
42 template <
class Derived>
45 return std::static_pointer_cast<Derived>(shared_from_this());
47 template <
class Derived>
50 return std::weak_ptr<Derived>(shared_from_base<Derived>());
54 auto tag =
element_[
"tagName"].as<std::string>();
55 std::transform(tag.begin(), tag.end(), tag.begin(), [](
unsigned char c) {
56 return std::tolower(c);
63 return element_[
"namespaceURI"].as<std::string>();
Definition: basic_element.hpp:14
std::weak_ptr< Derived > weak_from_base()
Definition: basic_element.hpp:48
BasicElement()
Definition: basic_element.hpp:68
virtual ~BasicElement()=default
Nui::val element_
Definition: basic_element.hpp:72
Nui::val const & val() const
Definition: basic_element.hpp:21
std::shared_ptr< Derived > shared_from_base()
Definition: basic_element.hpp:43
std::string tagName() const
Definition: basic_element.hpp:52
BasicElement(Nui::val val)
Definition: basic_element.hpp:16
std::optional< std::string > namespaceUri() const
Definition: basic_element.hpp:60
Nui::val & val()
Definition: basic_element.hpp:25
Definition: basic_element.hpp:12
Definition: file_dialog.hpp:6
emscripten::val val
Definition: val.hpp:5