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-04-23
  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. }