Mantid
Loading...
Searching...
No Matches
NotebookBuilder.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
16#include "MantidAPI/DllConfig.h"
21
22#include <sstream>
23
24namespace Mantid {
25namespace API {
26
27class MANTID_API_DLL NotebookBuilder {
28public:
29 NotebookBuilder(const std::shared_ptr<HistoryView> &view, std::string versionSpecificity = "old");
30 virtual ~NotebookBuilder() = default;
32 const std::string build(const std::string &ws_name, const std::string &ws_title, const std::string &ws_comment);
33
34private:
35 void writeHistoryToStream(std::vector<HistoryItem>::const_iterator &iter);
36 void buildChildren(std::vector<HistoryItem>::const_iterator &iter);
37 const std::string buildAlgorithmString(const AlgorithmHistory_const_sptr &algHistory);
38 const std::string buildPropertyString(const Mantid::Kernel::PropertyHistory_const_sptr &propHistory);
39
40 const std::vector<HistoryItem> m_historyItems;
41 std::string m_output;
43 std::unique_ptr<NotebookWriter> m_nb_writer;
44};
45
46} // namespace API
47} // namespace Mantid
const std::vector< HistoryItem > m_historyItems
std::unique_ptr< NotebookWriter > m_nb_writer
virtual ~NotebookBuilder()=default
std::shared_ptr< const AlgorithmHistory > AlgorithmHistory_const_sptr
std::shared_ptr< const PropertyHistory > PropertyHistory_const_sptr
Helper class which provides the Collimation Length for SANS instruments.