NullPointerEvaluator.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-08
  6. * Changed: 2023-04-04
  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 void *_rawArgument);
  21. explicit NullPointerEvaluator(const void *_rawArgument, ::std::string _message);
  22. explicit NullPointerEvaluator(const ::std::shared_ptr<void> &_argument);
  23. explicit NullPointerEvaluator(const ::std::shared_ptr<void> &_argument, ::std::string _message);
  24. ~NullPointerEvaluator() noexcept override;
  25. void evaluate() override;
  26. private:
  27. ::std::shared_ptr<void> argument{};
  28. ::std::string message{};
  29. };
  30. }
  31. #endif