#pragma once
/*
ApplicationFramework
by John Ryland
Copyright (c) 2023
*/
////////////////////////////////////////////////////////////////////////////////////
// System Collection
#include "ICollection.h"
#include "ISystem.h"
namespace ApplicationFramework {
template <typename InterfaceType>
class ISystemCollection : public ICollection<InterfaceType>
{
public:
void Initialize() override { this->Apply(std::mem_fn(&InterfaceType::Initialize)); }
void Shutdown() override { this->ApplyReverse(std::mem_fn(&InterfaceType::Shutdown)); }
void Update() override { this->Apply(std::mem_fn(&InterfaceType::Update)); }
};
using SystemCollection = ISystemCollection<ISystem>;
} // ApplicationFramework namespace