Attribute.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <exml/Node.hpp>
9 #include <vector>
10 
11 namespace exml {
12  namespace internal {
13  class Attribute;
14  }
15  class AttributeListData;
19  class Attribute : public exml::Node {
20  public:
30  // TODO : Attribute(nullptr);
35  Attribute(const exml::Attribute& _obj);
41  Attribute(const std::string& _name="", const std::string& _value="");
47  exml::Attribute& operator= (const exml::Attribute& _obj);
48  public:
53  virtual void setName(const std::string& _name);
58  virtual const std::string& getName() const;
63  std::pair<std::string, std::string> getPair() const;
64  public:
65  void clear() override;
66  friend class exml::AttributeListData;
67  private:
68  ememory::SharedPtr<exml::internal::Attribute> getInternalAttribute();
69  };
70 }
71 
Attribute(const std::string &_name="", const std::string &_value="")
Constructor.
exml namespace containing all function for XML interpretor
Definition: Attribute.hpp:11
Basic main object of all xml elements.
Definition: Node.hpp:30
virtual const std::string & getName() const
get the current name of the Attribute
Definition: Attribute.hpp:46
void clear() override
clear the Node
Single attribute element.
Definition: Attribute.hpp:19
Abstract interface on all attributes elements.
Definition: AttributeList.hpp:17
virtual void setName(const std::string &_name)
set the name of the attribute
Definition: Attribute.hpp:39