XmlAttribute.hpp 958 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: 2022-07-03
  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::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() override = default;
  21. ::std::string getName();
  22. ::std::string getValue();
  23. void setName(const ::std::string &_name);
  24. void setValue(const ::std::string &_value);
  25. ::std::string toXml();
  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