SectionPairRowListValueArgumentEvaluator.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-20
  6. * Changed: 2023-02-20
  7. *
  8. * */
  9. #include <ls-std/core/exception/IllegalArgumentException.hpp>
  10. #include <ls-std/io/section-pair/evaluator/SectionPairRowListValueArgumentEvaluator.hpp>
  11. #include <ls-std/io/section-pair/validator/SectionPairRowListValueValidator.hpp>
  12. ls::std::io::SectionPairRowListValueArgumentEvaluator::SectionPairRowListValueArgumentEvaluator(::std::string _listValueRow) : ls::std::core::Class("SectionPairRowListValueArgumentEvaluator"), listValueRow(::std::move(_listValueRow))
  13. {}
  14. ls::std::io::SectionPairRowListValueArgumentEvaluator::~SectionPairRowListValueArgumentEvaluator() = default;
  15. void ls::std::io::SectionPairRowListValueArgumentEvaluator::evaluate()
  16. {
  17. if (!ls::std::io::SectionPairRowListValueValidator{this->listValueRow}.isValid())
  18. {
  19. ::std::string message = "\"" + this->listValueRow + "\" is not a valid section pair list value row!";
  20. throw ls::std::core::IllegalArgumentException{message};
  21. }
  22. }