/*
* Author:          Patrick-Christopher Mattulat
* Co-Author:       Claude Sonnet 4.6 (LLM)
* Company:         Lynar Studios
* E-Mail:          webmaster@lynarstudios.com
* Created:         2024-05-16
* Changed:         2026-06-23
*
* */

#include <ls-std/core/evaluator/NullPointerArgumentEvaluator.hpp>
#include <ls-std/event/Event.hpp>

using ls::standard::core::Class;
using ls::standard::core::NullPointerArgumentEvaluator;
using ls::standard::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;
}

void Event::setManager(const shared_ptr<Class> &_manager)
{
  NullPointerArgumentEvaluator(_manager).evaluate();
  this->manager = _manager;
}

Event Event::supervisedBy(const shared_ptr<Class> &_manager) const
{
  NullPointerArgumentEvaluator(_manager).evaluate();
  auto event = Event(this->getClassName());
  event.setManager(_manager);

  return event;
}
