FactoryBase.h Source File#
FactoryBase.h
Go to the documentation of this file.
Base class for exceptions thrown by Cantera classes.
Definition ctexceptions.h:66
virtual void deleteFactory()=0
Virtual abstract function that deletes the factory.
static vector< FactoryBase * > s_vFactoryRegistry
statically held list of Factories.
Definition FactoryBase.h:60
static void deleteFactories()
static function that deletes all factories in the internal registry maintained in a static variable
Definition FactoryBase.h:35
Factory class that supports registering functions to create objects.
Definition FactoryBase.h:69
T * create(const string &name, Args... args)
Create an object using the object construction function corresponding to "name" and the provided cons...
Definition FactoryBase.h:75
void reg(const string &name, function< T *(Args...)> f)
Register a new object construction function.
Definition FactoryBase.h:80
std::unordered_map< string, string > m_synonyms
Map of synonyms to canonical names.
Definition FactoryBase.h:129
std::unordered_map< string, string > m_deprecated_names
Map of deprecated synonyms to canonical names.
Definition FactoryBase.h:133
bool exists(const string &name) const
Returns true if name is registered with this factory.
Definition FactoryBase.h:110
void addAlias(const string &original, const string &alias)
Add an alias for an existing registered type.
Definition FactoryBase.h:85
string canonicalize(const string &name)
Get the canonical name registered for a type.
Definition FactoryBase.h:94
void addDeprecatedAlias(const string &original, const string &alias)
Add a deprecated alias for an existing registered type.
Definition FactoryBase.h:116
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
void warn_deprecated(const string &source, const AnyBase &node, const string &message)
A deprecation warning for syntax in an input file.
Definition AnyMap.cpp:1926
Generated by 1.9.7