XmlAttribute.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-09-23
  6. * Changed: 2024-09-09
  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 <ls-std/os/dynamic-goal.hpp>
  13. #include <string>
  14. /*
  15. * @doc: class(name: 'XmlAttribute', package: 'io')
  16. * */
  17. namespace ls::std::io
  18. {
  19. class LS_STD_DYNAMIC_GOAL XmlAttribute : public ls::std::core::Class
  20. {
  21. public:
  22. explicit XmlAttribute(const ::std::string &_name);
  23. ~XmlAttribute() noexcept override;
  24. [[nodiscard]] ::std::string getName() const;
  25. [[nodiscard]] ::std::string getValue() const;
  26. void setName(const ::std::string &_name);
  27. void setValue(const ::std::string &_value);
  28. [[nodiscard]] ::std::string toXml() const;
  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. #endif