ChimeraTK-DeviceAccess
03.25.00
Loading...
Searching...
No Matches
DataConsistencyRealmStore.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2
// SPDX-License-Identifier: LGPL-3.0-or-later
3
#pragma once
4
5
#include "
DataConsistencyRealm.h
"
6
7
#include <map>
8
#include <mutex>
9
#include <string>
10
11
namespace
ChimeraTK::async
{
12
13
/********************************************************************************************************************/
14
15
class
DataConsistencyRealmStore
{
16
public
:
17
static
DataConsistencyRealmStore
&
getInstance
() {
18
static
DataConsistencyRealmStore
instance;
19
return
instance;
20
}
21
22
std::shared_ptr<DataConsistencyRealm>
getRealm
(
const
std::string& realmName);
23
24
private
:
25
DataConsistencyRealmStore
() =
default
;
26
~DataConsistencyRealmStore
() =
default
;
27
28
std::mutex _mapMutex;
29
std::map<std::string, std::weak_ptr<DataConsistencyRealm>> _realmMap;
30
};
31
32
/********************************************************************************************************************/
33
34
}
// namespace ChimeraTK::async
DataConsistencyRealm.h
ChimeraTK::async::DataConsistencyRealmStore
Definition
DataConsistencyRealmStore.h:15
ChimeraTK::async::DataConsistencyRealmStore::getInstance
static DataConsistencyRealmStore & getInstance()
Definition
DataConsistencyRealmStore.h:17
ChimeraTK::async::DataConsistencyRealmStore::getRealm
std::shared_ptr< DataConsistencyRealm > getRealm(const std::string &realmName)
Definition
DataConsistencyRealmStore.cc:9
ChimeraTK::async
Definition
design_AsyncNDRegisterAcessor_and_NumericAddressedBackend.dox:1
sources
ChimeraTK-DeviceAccess
include
async
DataConsistencyRealmStore.h
Generated by
1.9.8