Mantid
Loading...
Searching...
No Matches
WriteLock.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
41class MANTID_KERNEL_DLL WriteLock {
42public:
43 WriteLock(const DataItem &item);
44 WriteLock(const WriteLock &) = delete;
45 WriteLock &operator=(const WriteLock &) = delete;
46 virtual ~WriteLock();
47
48private:
50 void *operator new(size_t);
52 void *operator new[](size_t);
53
56};
57
58} // namespace Kernel
59} // 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 write-lock for thread-safe access to DataItems.
Definition: WriteLock.h:41
WriteLock(const WriteLock &)=delete
const DataItem & m_item
Reference to the data item we are locking.
Definition: WriteLock.h:55
WriteLock & operator=(const WriteLock &)=delete
Helper class which provides the Collimation Length for SANS instruments.