XMLAttribute.cpp 766 B

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