Class ObjectFactory
Defined in File object_factory.h
Nested Relationships
Nested Types
Class Documentation
-
class ObjectFactory
Singleton object for handling the registration and making of
Object
s.Public Types
-
using ObjectGetInParamsFunc = InputParameters (*)()
Public Functions
-
ObjectFactory(const ObjectFactory&) = delete
-
ObjectFactory(const ObjectFactory&&) = delete
-
ObjectFactory &operator=(const ObjectFactory&) = delete
-
const std::map<std::string, ObjectRegistryEntry> &GetRegistry() const
Returns a constant reference to the object registry.
-
bool RegistryHasKey(const std::string &key) const
Checks if the object registry has a specific text key.
-
InputParameters GetRegisteredObjectParameters(const std::string &type) const
Returns the input parameters of a registered object.
-
void DumpRegister() const
Dumps the object registry to stdout.
Public Static Functions
-
static ObjectFactory &GetInstance() noexcept
Access to the singleton.
-
template<typename T>
static inline char AddObjectToRegistry(const std::string &namespace_name, const std::string &object_name)
-
template<typename T>
static inline char AddObjectToRegistry(const std::string &object_name)
-
template<typename T>
static inline char AddObjectToRegistryParamsOnly(const std::string &namespace_name, const std::string &object_name)
-
template<typename T>
static inline char AddObjectToRegistryParamsOnly(const std::string &object_name)
-
static inline char AddSyntaxBlockToRegistry(const std::string &namespace_name, const std::string &block_name, ObjectGetInParamsFunc syntax_function)
-
static inline char AddSyntaxBlockToRegistry(const std::string &block_name, ObjectGetInParamsFunc syntax_function)
-
struct ObjectRegistryEntry
Structure storing the entities necessary for creating an object.
Public Members
-
ObjectGetInParamsFunc get_in_params_func = nullptr
-
ObjectGetInParamsFunc get_in_params_func = nullptr
-
using ObjectGetInParamsFunc = InputParameters (*)()