6#ifndef DOMAIN_FACTORY_H
7#define DOMAIN_FACTORY_H
55template <
class T=Domain1D>
57 const string& domainType, shared_ptr<Solution> solution,
const string&
id=
"")
63 auto ret = std::dynamic_pointer_cast<T>(
68 "Invalid cast: unable to access 'Domain1D' as '{}'.",
demangle(
typeid(T)));
81 const string& domainType, shared_ptr<Solution> solution,
const string&
id=
"");
91 const string& domainType, shared_ptr<Solution> solution,
const string&
id=
"");
File contains the FactoryBase class declarations.
Base class for exceptions thrown by Cantera classes.
Factory class to create domain objects.
static std::mutex domain_mutex
Mutex for use when calling the factory.
DomainFactory()
default constructor, which is defined as private
void deleteFactory() override
Virtual abstract function that deletes the factory.
static DomainFactory * s_factory
Pointer to the single instance of the factory.
static DomainFactory * factory()
Return a pointer to the factory.
Factory class that supports registering functions to create objects.
string demangle(const std::type_info &type)
Convert a type name to a human readable string, using boost::core::demangle if available.
shared_ptr< T > newDomain(const string &domainType, shared_ptr< Solution > solution, const string &id="")
Create a Domain object of the specified type.
shared_ptr< Flow1D > newFlow1D(const string &domainType, shared_ptr< Solution > solution, const string &id)
Create a Flow1D object of the specified type.
shared_ptr< Boundary1D > newBoundary1D(const string &domainType, shared_ptr< Solution > solution, const string &id)
Create a Boundary1D object of the specified type.
Namespace for the Cantera kernel.