============================================================ ============================ Node ========================== ============================================================ */
| 164 | ============================================================ |
| 165 | */ |
| 166 | class Node { |
| 167 | |
| 168 | private: |
| 169 | Node_internal *m_node; |
| 170 | |
| 171 | public: |
| 172 | Node(); |
| 173 | Node( Node_internal *a_node ); |
| 174 | Node( Node const &a_node ); |
| 175 | ~Node(); |
| 176 | inline Attribute attribute(const char* a_name) const{ |
| 177 | return Attribute(m_node, a_name); |
| 178 | } |
| 179 | inline std::string attribute_as_string(const char* a_name) const{ |
| 180 | if(m_node == nullptr){ |
| 181 | return ""; |
| 182 | } |
| 183 | return m_node->attribute(a_name); |
| 184 | } |
| 185 | inline int attribute_as_int(const char* a_name) const{ |
| 186 | if(m_node == nullptr){ |
| 187 | return 0; |
| 188 | } |
| 189 | return m_node->attribute_as_int(a_name); |
| 190 | } |
| 191 | inline long attribute_as_long(const char* a_name) const{ |
| 192 | if(m_node == nullptr){ |
| 193 | return 0; |
| 194 | } |
| 195 | return m_node->attribute_as_long(a_name); |
| 196 | } |
| 197 | inline double attribute_as_double(const char* a_name) const{ |
| 198 | if(m_node == nullptr){ |
| 199 | return 0.0; |
| 200 | } |
| 201 | return m_node->attribute_as_double(a_name); |
| 202 | } |
| 203 | Node child(const char* name) const; |
| 204 | Node first_child() const; |
| 205 | Node next_sibling() const; |
| 206 | void to_next_sibling() const; |
| 207 | Node &operator=(const Node &other); |
| 208 | std::string name() const; |
| 209 | bool empty() const; |
| 210 | Text text() const; |
| 211 | Data data() const; |
| 212 | }; |
| 213 | |
| 214 | |
| 215 | /* |
no outgoing calls
no test coverage detected