NullPointerEvaluator.hpp 894 B

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