XmlAttribute.hpp 1017 B

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