Cantera  3.0.0
Loading...
Searching...
No Matches
ExtensionManagerFactory.cpp
Go to the documentation of this file.
1//! @file ExtensionManagerFactory.cpp
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
7
8using namespace std;
9
10namespace Cantera
11{
12
13ExtensionManagerFactory* ExtensionManagerFactory::s_factory = 0;
15
17{
18 unique_lock<mutex> lock(s_mutex);
19 if (!s_factory) {
21 }
22 return *s_factory;
23}
24
26{
27 unique_lock<mutex> lock(s_mutex);
28 delete s_factory;
29 s_factory = 0;
30}
31
32}
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 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.
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564