dom_named_node_map.h
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2013 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 "../api_core.h"
33 #include <memory>
34 #include "dom_string.h"
35 
36 namespace clan
37 {
40 
41 class DomNode;
42 class DomNamedNodeMap_Impl;
43 
52 class CL_API_CORE DomNamedNodeMap
53 {
56 
57 public:
60 
64  DomNamedNodeMap(const DomNamedNodeMap &copy);
65 
66  ~DomNamedNodeMap();
67 
71 
72 public:
74  unsigned long get_length() const;
75 
79 
80 public:
82  DomNode get_named_item(const DomString &name) const;
83 
85  DomNode get_named_item_ns(
86  const DomString &namespace_uri,
87  const DomString &local_name) const;
88 
90 
96  DomNode set_named_item(const DomNode &node);
97 
99 
101  DomNode set_named_item_ns(const DomNode &node);
102 
104 
107  DomNode remove_named_item(const DomString &name);
108 
110 
112  DomNode remove_named_item_ns(
113  const DomString &namespace_uri,
114  const DomString &local_name);
115 
117 
118  DomNode item(unsigned long index) const;
119 
123 
124 protected:
125 
129  DomNamedNodeMap(const std::shared_ptr<DomNamedNodeMap_Impl> &impl);
130 
131  std::shared_ptr<DomNamedNodeMap_Impl> impl;
132 
133  friend class DomNode;
135 };
136 
137 }
138 
std::string DomString
Definition: dom_string.h:37
DOM Node class.
Definition: dom_node.h:71
std::shared_ptr< DomNamedNodeMap_Impl > impl
Definition: dom_named_node_map.h:131
DOM Named Node Map class.
Definition: dom_named_node_map.h:52