#pragma once

#include "event_manager.hpp"

namespace VE
{
  template <typename T>
  void CONNECT(T* obj) 
  {
    event_manager::instance().connect(obj, &T::on_event);
  }

  template <typename T>
  void DISCONNECT(T* obj) 
  {
    event_manager::instance().disconnect(obj, &T::on_event);
  }

  template <typename TYPE, typename DATA>
  void EMIT(TYPE t, DATA d, int id = -1)
  {
    event_manager::instance().emit(event{ t, d, id });
  }

  inline void EMIT(event e)
  {
    event_manager::instance().emit(e);
  }
}
