Mantid
Loading...
Searching...
No Matches
ReadLock.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2012 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9#include "MantidKernel/DllConfig.h"
10
11namespace Mantid {
12namespace Kernel {
13//---------------------------------------------------------------------------
14// Forward Declarations
15//---------------------------------------------------------------------------
16class DataItem;
17
37class MANTID_KERNEL_DLL ReadLock {
38public:
39 ReadLock(const DataItem &item);
40 ReadLock(const ReadLock &) = delete;
41 ReadLock &operator=(const ReadLock &) = delete;
42 virtual ~ReadLock();
43
44private:
46 void *operator new(size_t);
48 void *operator new[](size_t);
49
52};
53
54} // namespace Kernel
55} // namespace Mantid
This class forms the base class of any item that wishes to be stored in the analysis data service.
Definition: DataItem.h:39
Scoped, read-only lock for thread-safe access to DataItems.
Definition: ReadLock.h:37
ReadLock & operator=(const ReadLock &)=delete
const DataItem & m_item
Reference to the data item we are locking.
Definition: ReadLock.h:51
ReadLock(const ReadLock &)=delete
Helper class which provides the Collimation Length for SANS instruments.