SectionPairRowSingleValueArgumentEvaluator.cpp 1.1 KB

1234567891011121314151617181920212223242526
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-19
  6. * Changed: 2023-02-19
  7. *
  8. * */
  9. #include <ls-std/core/exception/IllegalArgumentException.hpp>
  10. #include <ls-std/io/section-pair/evaluator/SectionPairRowSingleValueArgumentEvaluator.hpp>
  11. #include <ls-std/io/section-pair/validator/SectionPairRowSingleValueValidator.hpp>
  12. ls::std::io::SectionPairRowSingleValueArgumentEvaluator::SectionPairRowSingleValueArgumentEvaluator(::std::string _singleValueRow) : ls::std::core::Class("SectionPairRowSingleValueArgumentEvaluator"), singleValueRow(::std::move(_singleValueRow))
  13. {}
  14. ls::std::io::SectionPairRowSingleValueArgumentEvaluator::~SectionPairRowSingleValueArgumentEvaluator() = default;
  15. void ls::std::io::SectionPairRowSingleValueArgumentEvaluator::evaluate()
  16. {
  17. if (!ls::std::io::SectionPairRowSingleValueValidator{this->singleValueRow}.isValid())
  18. {
  19. ::std::string message = "\"" + this->singleValueRow + "\" is not a valid section pair single value row!";
  20. throw ls::std::core::IllegalArgumentException{message};
  21. }
  22. }