123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /*
- * Author: Patrick-Christopher Mattulat
- * Company: Lynar Studios
- * E-Mail: webmaster@lynarstudios.com
- * Created: 2024-05-16
- * Changed: 2024-05-17
- *
- * */
- #include <ls-std/core/evaluator/NullPointerArgumentEvaluator.hpp>
- #include <ls-std/event/Event.hpp>
- using ls::std::core::Class;
- using ls::std::core::NullPointerArgumentEvaluator;
- using ls::std::event::Event;
- using ::std::shared_ptr;
- using ::std::string;
- Event::Event(const string &_name) : Class(_name)
- {}
- Event::~Event() noexcept = default;
- shared_ptr<Class> Event::getManager() const
- {
- return this->manager;
- }
- Event Event::of(const shared_ptr<Class> &_manager) const
- {
- NullPointerArgumentEvaluator(_manager).evaluate();
- auto event = Event(this->getClassName());
- event.setManager(_manager);
- return event;
- }
- void Event::setManager(const shared_ptr<Class> &_manager)
- {
- NullPointerArgumentEvaluator(_manager).evaluate();
- this->manager = _manager;
- }
|