XmlAttribute.cpp 798 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-09-23
  6. * Changed: 2021-05-02
  7. *
  8. * */
  9. #include <ls_std/io/xml/XmlAttribute.hpp>
  10. ls_std::XmlAttribute::XmlAttribute(std::string _name)
  11. : ls_std::Class("XmlAttribute"),
  12. name(std::move(_name))
  13. {}
  14. std::string ls_std::XmlAttribute::getName()
  15. {
  16. return this->name;
  17. }
  18. std::string ls_std::XmlAttribute::getValue()
  19. {
  20. return this->value;
  21. }
  22. void ls_std::XmlAttribute::setName(std::string _name)
  23. {
  24. this->name = std::move(_name);
  25. }
  26. void ls_std::XmlAttribute::setValue(std::string _value)
  27. {
  28. this->value = std::move(_value);
  29. }
  30. std::string ls_std::XmlAttribute::toXml()
  31. {
  32. return this->name + "=\"" + this->value + "\"";
  33. }