SectionPairRowSingleValue.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-10
  6. * Changed: 2023-02-11
  7. *
  8. * */
  9. #include <ls-std/core/evaluator/EmptyStringArgumentEvaluator.hpp>
  10. #include <ls-std/io/section-pair/evaluator/SectionPairRowValueArgumentEvaluator.hpp>
  11. #include <ls-std/io/section-pair/model/SectionPairRowSingleValue.hpp>
  12. ls::std::io::SectionPairRowSingleValue::SectionPairRowSingleValue(const ls::std::io::section_pair_row_value &_value) : ls::std::core::Class("SectionPairRowSingleValue"), ls::std::io::SectionPairRowValue(ls::std::io::SECTION_PAIR_ROW_SINGLE_VALUE)
  13. {
  14. this->_set(_value);
  15. }
  16. ls::std::io::SectionPairRowSingleValue::~SectionPairRowSingleValue() = default;
  17. ls::std::io::section_pair_row_value ls::std::io::SectionPairRowSingleValue::get()
  18. {
  19. return this->value;
  20. }
  21. ls::std::io::SectionPairRowEnumType ls::std::io::SectionPairRowSingleValue::getType()
  22. {
  23. return this->type;
  24. }
  25. void ls::std::io::SectionPairRowSingleValue::set(const ls::std::io::section_pair_row_value &_value)
  26. {
  27. this->_set(_value);
  28. }
  29. void ls::std::io::SectionPairRowSingleValue::_set(const ls::std::io::section_pair_row_value &_value)
  30. {
  31. ls::std::core::EmptyStringArgumentEvaluator{_value}.evaluate();
  32. ls::std::io::SectionPairRowValueArgumentEvaluator(_value, "section pair single value \"" + _value + "\" contains invalid characters!").evaluate();
  33. this->value = _value;
  34. }