XmlAttribute.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-09-23
  6. * Changed: 2022-07-01
  7. *
  8. * */
  9. #ifndef LS_STD_XML_ATTRIBUTE_HPP
  10. #define LS_STD_XML_ATTRIBUTE_HPP
  11. #include <ls_std/core/Class.hpp>
  12. #include <string>
  13. #include <ls_std/os/dynamic_goal.hpp>
  14. namespace ls
  15. {
  16. namespace std
  17. {
  18. namespace io
  19. {
  20. class DYNAMIC_GOAL XmlAttribute : public ls::std::core::Class
  21. {
  22. public:
  23. explicit XmlAttribute(const ::std::string &_name);
  24. ~XmlAttribute() override = default;
  25. ::std::string getName();
  26. ::std::string getValue();
  27. void setName(const ::std::string &_name);
  28. void setValue(const ::std::string &_value);
  29. ::std::string toXml();
  30. private:
  31. ::std::string name{};
  32. ::std::string value{};
  33. void _assignName(const ::std::string &_name);
  34. void _assignValue(const ::std::string &_value);
  35. };
  36. }
  37. }
  38. }
  39. #endif