// #include // #include // #include // #include // #include "Registry.h" // #include "Course.h" // #include "port/Game.h" // template Registry::Registry() { // } // template void Registry::Add(std::string id, std::function fn) { // // need to handle duplicate registration // ContentVault[id] = fn; // } // template // void Registry::AddArgs(std::string id) { // ArgsVault[id] = [](Args&&... args) -> T* { // return new T(std::forward(args)...); // }; // } // template // T* Registry::Get(std::string id) { // auto it = ContentVault.find(id); // if (it != ContentVault.end()) { // return it->second(); // } // return nullptr; // } // // Available Registries // Registry Courses; // Registry Cups; // Registry Actors; // void AddCourse(std::string id, Course* course) { // Courses.Add(id, [course]() { return course; }); // course->Id = id; // } // void AddCup(std::string id, Cup* cup) { // Cups.Add(id, [cup]() { return cup; }); // //cup->Id = id; // } // void AddActor(std::string id, AActor* actor) { // Actors.Add(id, [actor]() { return actor; }); // } // void AddStockContent() { // AddActor("mk:banana", new AMarioSign({0, 0, 0})); // } // template class Registry; // template class Registry; // template class Registry;