Cantera  3.1.0a1
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 
8 using namespace std;
9 
10 namespace Cantera
11 {
12 
13 ExtensionManagerFactory* ExtensionManagerFactory::s_factory = 0;
14 mutex ExtensionManagerFactory::s_mutex;
15 
16 ExtensionManagerFactory& ExtensionManagerFactory::factory()
17 {
18  unique_lock<mutex> lock(s_mutex);
19  if (!s_factory) {
20  s_factory = new ExtensionManagerFactory();
21  }
22  return *s_factory;
23 }
24 
25 void ExtensionManagerFactory::deleteFactory()
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.
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:564