3#ifndef CT_EXTENSIONMANAGERFACTORY_H
4#define CT_EXTENSIONMANAGERFACTORY_H
22 static shared_ptr<ExtensionManager>
build(
const string& extensionType) {
23 return shared_ptr<ExtensionManager>(
factory().
create(extensionType));
File contains the FactoryBase class declarations.
A factory class for creating ExtensionManager objects.
static ExtensionManagerFactory * s_factory
static member of the single factory instance
void deleteFactory() override
Delete the static instance of this factory.
static shared_ptr< ExtensionManager > build(const string &extensionType)
Create a new ExtensionManager.
static ExtensionManagerFactory & factory()
Static function that returns the static instance of the factory, creating it if necessary.
ExtensionManagerFactory()=default
Private constructor prevents direct usage.
static std::mutex s_mutex
Decl for locking mutex for thermo factory singleton.
Factory class that supports registering functions to create objects.
ExtensionManager * create(const string &name, Args... args)
Create an object using the object construction function corresponding to "name" and the provided cons...
Namespace for the Cantera kernel.