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
11#include <cstddef>
12
13namespace Mantid {
14namespace Kernel {
15//---------------------------------------------------------------------------
16// Forward Declarations
17//---------------------------------------------------------------------------
18class DataItem;
19
39class MANTID_KERNEL_DLL ReadLock {
40public:
41 ReadLock(const DataItem &item);
42 ReadLock(const ReadLock &) = delete;
43 ReadLock &operator=(const ReadLock &) = delete;
44 virtual ~ReadLock();
45
46private:
48 void *operator new(std::size_t);
50 void *operator new[](std::size_t);
51
54};
55
56} // namespace Kernel
57} // 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:39
ReadLock & operator=(const ReadLock &)=delete
const DataItem & m_item
Reference to the data item we are locking.
Definition ReadLock.h:53
ReadLock(const ReadLock &)=delete
Helper class which provides the Collimation Length for SANS instruments.