Mantid
Loading...
Searching...
No Matches
NotebookWriter.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
14#include "MantidAPI/DllConfig.h"
15
16#include <json/writer.h>
17#include <string>
18
19namespace Mantid {
20namespace API {
21
22class MANTID_API_DLL NotebookWriter {
23
24public:
26 virtual ~NotebookWriter() = default;
27 std::string markdownCell(const std::string &string_text);
28 std::string codeCell(const std::string &string_code);
29 std::string writeNotebook();
30
31private:
32 void headerComment();
33 void headerCode();
34
35 Json::Value buildNotebook();
36
37 void markdownCell(Json::Value string_array);
38 void codeCell(Json::Value array_code);
39
40 Json::Value m_cell_buffer;
41};
42} // namespace API
43} // namespace Mantid
virtual ~NotebookWriter()=default
Helper class which provides the Collimation Length for SANS instruments.