Mantid
Loading...
Searching...
No Matches
HistoryView.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 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//----------------------------------------------------------------------
10// Includes
11//----------------------------------------------------------------------
12#include "MantidAPI/DllConfig.h"
16
17#include <list>
18#include <vector>
19
20namespace Mantid {
21namespace API {
22
32class MANTID_API_DLL HistoryView {
33public:
34 HistoryView(const WorkspaceHistory &wsHist);
35 virtual ~HistoryView() = default;
36 void unroll(size_t index);
37 void unrollAll();
38 void roll(size_t index);
39 void rollAll();
40 void filterBetweenExecDate(Mantid::Types::Core::DateAndTime start,
41 Mantid::Types::Core::DateAndTime end = Mantid::Types::Core::DateAndTime::getCurrentTime());
47 const std::vector<HistoryItem> &getAlgorithmsList() const { return m_historyItems; };
48
49 size_t size() const { return m_historyItems.size(); }
50
51private:
52 void unroll(std::vector<HistoryItem>::iterator &it);
53 void roll(std::vector<HistoryItem>::iterator &it);
54 void rollChildren(std::vector<HistoryItem>::iterator it);
55
57 std::vector<HistoryItem> m_historyItems;
58};
59
60} // namespace API
61} // namespace Mantid
std::map< DeltaEMode::Type, std::string > index
Definition: DeltaEMode.cpp:19
This class wraps an algorithm history pointer to add additional functionality when creating a History...
Definition: HistoryView.h:32
size_t size() const
Definition: HistoryView.h:49
std::vector< HistoryItem > m_historyItems
Definition: HistoryView.h:57
virtual ~HistoryView()=default
const WorkspaceHistory m_wsHist
Definition: HistoryView.h:56
const std::vector< HistoryItem > & getAlgorithmsList() const
Get the list of History Items for this view.
Definition: HistoryView.h:47
This class stores information about the Workspace History used by algorithms on a workspace and the e...
Helper class which provides the Collimation Length for SANS instruments.