3#include "Foundation/Logging/Logger.h"
10Cogs::Core::Services::Services(Context * context) :
16Cogs::Core::Services::~Services()
21void Cogs::Core::Services::clear()
23 for (
auto & s : services) {
27 context->memory->baseAllocator->deallocate(s.service, s.size);
34void Cogs::Core::Services::addFrameCallback(std::function<
void(
void)> callback)
36 callbacks.push_back(callback);
39void Cogs::Core::Services::dispatchFrameCallbacks()
41 for (
auto & c : callbacks) {
48 if (locateService(typeId)) {
50 LOG_WARNING(logger,
"Service %s has already been registered. Returning previously created service.", type.getName().c_str());
59 for (
auto & s : services) {
Log implementation class.
static const Type & getType()
Get the Type of the given template argument.
constexpr Log getLogger(const char(&name)[LEN]) noexcept
uint16_t TypeId
Built in type used to uniquely identify a single type instance.