/*
 * Author:          Patrick-Christopher Mattulat
 * Co-Author:       Claude Sonnet 4.6 (LLM)
 * Company:         Lynar Studios
 * E-Mail:          webmaster@lynarstudios.com
 * Created:         2020-09-23
 * Changed:         2026-06-23
 *
 * */

#ifndef LS_STD_XML_ATTRIBUTE_HPP
#define LS_STD_XML_ATTRIBUTE_HPP

#include <ls-std/core/Class.hpp>
#include <ls-std/os/dynamic-goal.hpp>
#include <string>

/*
 * @doc: class(name: 'XmlAttribute', package: 'io')
 * @doc: io.XmlAttribute.description('This class represents an XML attribute and can be serialized to an XML tag.')
 * */

namespace ls::standard::io
{
  class LS_STD_DYNAMIC_GOAL XmlAttribute : public ls::standard::core::Class
  {
    public:

      explicit XmlAttribute(const ::std::string &_name);
      ~XmlAttribute() noexcept override;

      [[nodiscard]] ::std::string getName() const;
      [[nodiscard]] ::std::string getValue() const;
      void setName(const ::std::string &_name);
      void setValue(const ::std::string &_value);
      [[nodiscard]] ::std::string toXml() const;

    private:

      ::std::string name{};
      ::std::string value{};

      void _assignName(const ::std::string &_name);
      void _assignValue(const ::std::string &_value);
  };
}

#endif
