IndexOutOfBoundsEvaluator.hpp 905 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-10
  6. * Changed: 2024-05-31
  7. *
  8. * */
  9. #ifndef LS_STD_INDEX_OUT_OF_BOUNDS_EVALUATOR_EVALUATOR_HPP
  10. #define LS_STD_INDEX_OUT_OF_BOUNDS_EVALUATOR_EVALUATOR_HPP
  11. #include <ls-std/core/definition.hpp>
  12. #include <ls-std/core/interface/IEvaluator.hpp>
  13. #include <string>
  14. namespace ls::std::core
  15. {
  16. ls_std_class IndexOutOfBoundsEvaluator final : public interface_type::IEvaluator
  17. {
  18. public:
  19. explicit IndexOutOfBoundsEvaluator(size_t _index, size_t _size);
  20. explicit IndexOutOfBoundsEvaluator(size_t _index, size_t _size, ::std::string _message);
  21. ~IndexOutOfBoundsEvaluator() noexcept override;
  22. void evaluate() override;
  23. private:
  24. size_t index{};
  25. ::std::string message{};
  26. size_t size{};
  27. };
  28. }
  29. #endif