NullPointerEvaluator.hpp 983 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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-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. /*
  16. * @class(name: 'NullPointerEvaluator', package: 'Core')
  17. * */
  18. namespace ls::std::core
  19. {
  20. class LS_STD_DYNAMIC_GOAL NullPointerEvaluator : public ls::std::core::interface_type::IEvaluator
  21. {
  22. public:
  23. explicit NullPointerEvaluator(const ::std::shared_ptr<void> &_argument);
  24. explicit NullPointerEvaluator(const ::std::shared_ptr<void> &_argument, ::std::string _message);
  25. ~NullPointerEvaluator() noexcept override;
  26. void evaluate() override;
  27. private:
  28. ::std::shared_ptr<void> argument{};
  29. ::std::string message{};
  30. };
  31. }
  32. #endif