Mantid
Loading...
Searching...
No Matches
IPreview.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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
11
12#include <boost/python/class.hpp>
13#include <boost/python/enum.hpp>
14#include <boost/python/register_ptr_to_python.hpp>
15
17
18using namespace boost::python;
21
22namespace {
24} // namespace
25
27
28 register_ptr_to_python<IPreview *>();
29
30 enum_<IPreview::PreviewType>("PreviewType")
31 .value("IVIEW", IPreview::PreviewType::IVIEW)
32 .value("PLOT1D", IPreview::PreviewType::PLOT1D)
33 .value("PLOT2D", IPreview::PreviewType::PLOT2D)
34 .value("SVIEW", IPreview::PreviewType::SVIEW)
35 .export_values();
36
37 class_<IPreview, boost::noncopyable>("IPreview", no_init)
38 .def("name", &IPreview::name, arg("self"), "Get the name of the preview.")
39 .def("facility", &IPreview::facility, arg("self"), "Get the facility of the preview")
40 .def("technique", &IPreview::technique, arg("self"), "Get the technique of the preview.")
41 .def("type", &IPreview::type, arg("self"), "Get the type of the preview.")
42 .def("view", view, (arg("self"), arg("ws")), "Perform the preview operation on the workspace.");
43}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_IPreview()
Definition: IPreview.cpp:26
IPreview : This is the abstract base class of the raw data previews.
Definition: IPreview.h:24
virtual std::string name() const =0
Workspace_sptr view(Workspace_sptr ws) const
Definition: IPreview.h:32
virtual std::string facility() const =0
virtual std::string technique() const =0
virtual PreviewType type() const =0
std::shared_ptr< Workspace > Workspace_sptr
shared pointer to Mantid::API::Workspace
Definition: Workspace_fwd.h:20