Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
|
A class that holds references to all constructors for a type of Resource object. More...
#include <resource_database.hpp>
Public Member Functions | |
virtual | ~IResourceFactory ()=default |
Destroy the IResourceFactory object. | |
virtual std::shared_ptr< IResource > | createResource (const nlohmann::json &resourceDescription)=0 |
Creates a resource object of a specific type using its JSON resource description. | |
Protected Attributes | |
std::map< std::string, std::unique_ptr< IResourceConstructor > > | mFactoryMethods {} |
A list of constructors that may be used to create a Resource of this kind. | |
Friends | |
class | ResourceDatabase |
A class that holds references to all constructors for a type of Resource object.
|
pure virtual |
Creates a resource object of a specific type using its JSON resource description.
resourceDescription | A description of the resource. |
Implemented in ToyMaker::ResourceFactory< TResource >.