NullPointerEvaluator.hpp 916 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: 2023-05-24
  7. *
  8. * */
  9. #ifndef LS_STD_NULL_POINTER_EVALUATOR_HPP
  10. #define LS_STD_NULL_POINTER_EVALUATOR_HPP
  11. #include <ls-std/core/interface/IEvaluator.hpp>
  12. #include <ls-std/os/dynamic-goal.hpp>
  13. #include <memory>
  14. #include <string>
  15. namespace ls::std::core
  16. {
  17. class LS_STD_DYNAMIC_GOAL NullPointerEvaluator : public ls::std::core::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