OGS
PhreeqcInstancePool.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <string>
7#include <vector>
8
9namespace ChemistryLib
10{
11namespace PhreeqcIOData
12{
19{
20public:
24 PhreeqcInstancePool(std::string const& database, int num_instances);
25
27
28 // Disable copy
31
35 int getInstanceForThread(int thread_id) const;
36
38 int size() const { return static_cast<int>(instance_ids_.size()); }
39
42 static int createInstance(std::string const& database);
43
46 static void configureForStringIO(int id);
47
48private:
49 std::vector<int> instance_ids_;
50};
51
52} // namespace PhreeqcIOData
53} // namespace ChemistryLib
PhreeqcInstancePool & operator=(PhreeqcInstancePool const &)=delete
PhreeqcInstancePool(std::string const &database, int num_instances)
static int createInstance(std::string const &database)
int size() const
Returns the number of instances in the pool.
PhreeqcInstancePool(PhreeqcInstancePool const &)=delete