|
SPARK
0.1.0
A general purpose game engine written in C++.
|
A registry used to create Component instances and get serialization objects for it. More...
#include <Registries.h>
Public Member Functions | |
| ComponentRegistry () | |
| Instantiate a new ComponentRegistry with the default Component types. | |
| template<typename T > requires std::derived_from<T, core::Component> | |
| void | registerType () |
| Registers a new Component into the registry. | |
Public Member Functions inherited from spark::patterns::Factory< std::string, core::Component, core::GameObject * > | |
| Factory (const Factory &other)=delete | |
| Factory (Factory &&other) noexcept=default | |
| Factory & | operator= (const Factory &other)=delete |
| Factory & | operator= (Factory &&other) noexcept=default |
| void | registerType (const std::string &key) |
| Registers a type the factory can create. | |
| BasePtr | create (const std::string &key, Args &&... args) const |
| Creates an object of type BaseType. Throws an exception if the type is not registered. | |
| BasePtr | createOrFail (const std::string &key, Args &&... args) const noexcept |
| Creates an object of type BaseType. | |
| std::vector< std::string > | registeredTypes () const noexcept |
| Gets a vector of all registered types in the factory. | |
Additional Inherited Members | |
Public Types inherited from spark::patterns::Factory< std::string, core::Component, core::GameObject * > | |
| using | BasePtr |
| using | CreatorPtr |
A registry used to create Component instances and get serialization objects for it.
This is a factory used to deserialize components instances from a game save.
| void spark::core::ComponentRegistry::registerType | ( | ) |