AttributeList.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <exml/Node.hpp>
9 #include <exml/Attribute.hpp>
10 #include <exml/iterator.hpp>
11 
12 namespace exml {
13  class AttributeList;
18  private:
19  exml::AttributeList* m_data;
20  public:
26  public:
31  size_t size() const;
36  void add(exml::Attribute _attr);
43  bool remove(const std::string& _name);
49  exml::Attribute operator[] (int32_t _id);
55  const exml::Attribute operator[](int32_t _id) const;
61  std::pair<std::string, std::string> getPair(int32_t _id) const;
67  const std::string& operator[](const std::string& _name) const;
73  bool exist(const std::string& _name) const;
79  void set(const std::string& _name, const std::string& _value);
80  public:
82 
86  iterator begin();
91  iterator end();
96  const iterator begin() const;
101  const iterator end() const;
102  };
103 
107  class AttributeList : public exml::Node {
108  public:
110  protected:
119  AttributeList();
120  };
121 }
122 
exml::Attribute operator[](int32_t _id)
get attribute whith his ID
iterator end()
Get iterator of the next of the last sub nodes.
List of all attribute element in a node.
Definition: AttributeList.hpp:107
exml namespace containing all function for XML interpretor
Definition: Attribute.hpp:11
std::pair< std::string, std::string > getPair(int32_t _id) const
get attribute whith his ID
Basic main object of all xml elements.
Definition: Node.hpp:30
bool exist(const std::string &_name) const
check if an attribute exist or not with his name.
void add(exml::Attribute _attr)
add attribute on the List
Single attribute element.
Definition: Attribute.hpp:19
Definition: iterator.hpp:16
size_t size() const
get the number of attribute in the Node
AttributeListData attributes
interface on all attributes
Definition: AttributeList.hpp:109
Abstract interface on all attributes elements.
Definition: AttributeList.hpp:17
iterator begin()
Get iterator of the first sub nodes.
AttributeListData(exml::AttributeList *_list)
Constructor on the AttributeListData class.