Newer
Older
GameEngine / src / Framework / ICoreSystemCollection.h
@John Ryland John Ryland on 22 Aug 762 bytes save WIP
#pragma once

/*
	ApplicationFramework
	by John Ryland
	Copyright (c) 2023
*/

////////////////////////////////////////////////////////////////////////////////////
//	Core System Collection

#include "ISystemCollection.h"
#include "ICoreSystem.h"

namespace ApplicationFramework {

template <typename InterfaceType>
class ICoreSystemCollection : public ISystemCollection<InterfaceType>
{
public:
    void Prepare() override       { this->Apply(std::mem_fn(&ICoreSystem::Prepare)); }
    void Render() override        { this->Apply(std::mem_fn(&ICoreSystem::Render)); }
    void Present() override       { this->Apply(std::mem_fn(&ICoreSystem::Present)); }
};

using CoreSystemCollection = ICoreSystemCollection<ICoreSystem>;

} // ApplicationFramework namespace