XmlAttribute.hpp 1008 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-09-23
  6. * Changed: 2022-05-11
  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. namespace ls
  14. {
  15. namespace std
  16. {
  17. namespace io
  18. {
  19. class XmlAttribute : public ls::std::core::Class
  20. {
  21. public:
  22. explicit XmlAttribute(const ::std::string &_name);
  23. ~XmlAttribute() override = default;
  24. ::std::string getName();
  25. ::std::string getValue();
  26. void setName(const ::std::string &_name);
  27. void setValue(const ::std::string &_value);
  28. ::std::string toXml();
  29. private:
  30. ::std::string name{};
  31. ::std::string value{};
  32. void _assignName(const ::std::string &_name);
  33. void _assignValue(const ::std::string &_value);
  34. };
  35. }
  36. }
  37. }
  38. #endif