dom_named_node_map.h Source File - ClanLib SDK
Description: dom_named_node_map.h Source File

dom_named_node_map.h
1/*
2** ClanLib SDK
3** Copyright (c) 1997-2020 The ClanLib Team
4**
5** This software is provided 'as-is', without any express or implied
6** warranty. In no event will the authors be held liable for any damages
7** arising from the use of this software.
8**
9** Permission is granted to anyone to use this software for any purpose,
10** including commercial applications, and to alter it and redistribute it
11** freely, subject to the following restrictions:
12**
13** 1. The origin of this software must not be misrepresented; you must not
14** claim that you wrote the original software. If you use this software
15** in a product, an acknowledgment in the product documentation would be
16** appreciated but is not required.
17** 2. Altered source versions must be plainly marked as such, and must not be
18** misrepresented as being the original software.
19** 3. This notice may not be removed or altered from any source distribution.
20**
21** Note: Some of the libraries ClanLib may link to may have additional
22** requirements or restrictions.
23**
24** File Author(s):
25**
26** Magnus Norddahl
27*/
28
29
30#pragma once
31
32#include <memory>
33#include "dom_string.h"
34
35namespace clan
36{
39
40 class DomNode;
41 class DomNamedNodeMap_Impl;
42
51 class DomNamedNodeMap
52 {
53 public:
55 DomNamedNodeMap();
56
60 DomNamedNodeMap(const DomNamedNodeMap &copy);
61
62 ~DomNamedNodeMap();
63
65 unsigned long get_length() const;
66
68 DomNode get_named_item(const DomString &name) const;
69
71 DomNode get_named_item_ns(
72 const DomString &namespace_uri,
73 const DomString &local_name) const;
74
76
82 DomNode set_named_item(const DomNode &node);
83
85
87 DomNode set_named_item_ns(const DomNode &node);
88
90
93 DomNode remove_named_item(const DomString &name);
94
96
98 DomNode remove_named_item_ns(
99 const DomString &namespace_uri,
100 const DomString &local_name);
101
103
104 DomNode item(unsigned long index) const;
105
106 protected:
107 DomNamedNodeMap(const std::shared_ptr<DomNamedNodeMap_Impl> &impl);
108 std::shared_ptr<DomNamedNodeMap_Impl> impl;
109 friend class DomNode;
110 };
111
113}
clan::DomNamedNodeMap
DOM Named Node Map class.
Definition dom_named_node_map.h:52
clan::DomNamedNodeMap::remove_named_item_ns
DomNode remove_named_item_ns(const DomString &namespace_uri, const DomString &local_name)
Removes a node specified by namespace URI and local name.
clan::DomNamedNodeMap::get_length
unsigned long get_length() const
The number of nodes in the map.
clan::DomNamedNodeMap::impl
std::shared_ptr< DomNamedNodeMap_Impl > impl
Definition dom_named_node_map.h:108
clan::DomNamedNodeMap::~DomNamedNodeMap
~DomNamedNodeMap()
clan::DomNamedNodeMap::item
DomNode item(unsigned long index) const
Returns the indexth item in the map.
clan::DomNamedNodeMap::DomNamedNodeMap
DomNamedNodeMap(const std::shared_ptr< DomNamedNodeMap_Impl > &impl)
clan::DomNamedNodeMap::DomNamedNodeMap
DomNamedNodeMap()
Constructs a DOM NamedNodeMap handle.
clan::DomNamedNodeMap::set_named_item
DomNode set_named_item(const DomNode &node)
Adds a node using its node name attribute.
clan::DomNamedNodeMap::remove_named_item
DomNode remove_named_item(const DomString &name)
Removes a node specified by name.
clan::DomNamedNodeMap::DomNamedNodeMap
DomNamedNodeMap(const DomNamedNodeMap &copy)
Constructs a DomNamedNodeMap.
clan::DomNamedNodeMap::set_named_item_ns
DomNode set_named_item_ns(const DomNode &node)
Adds a node using its namespace URI and local name.
clan::DomNamedNodeMap::get_named_item
DomNode get_named_item(const DomString &name) const
Retrieves a node specified by name.
clan::DomNamedNodeMap::get_named_item_ns
DomNode get_named_item_ns(const DomString &namespace_uri, const DomString &local_name) const
Retrieves a node specified by namespace URI and local name.
clan::DomNode
DOM Node class.
Definition dom_node.h:71
clan::DomString
std::string DomString
Definition dom_string.h:37
clan
Definition clanapp.h:36