6#ifndef DOMAIN_FACTORY_H
7#define DOMAIN_FACTORY_H
52template <
class T=Domain1D>
54 const string& domainType, shared_ptr<Solution> solution,
const string&
id=
"")
60 auto ret = std::dynamic_pointer_cast<T>(
65 "Invalid cast: unable to access 'Domain1D' as '{}'.",
demangle(
typeid(T)));
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.
Namespace for the Cantera kernel.