Mantid
Loading...
Searching...
No Matches
PropertyHistory.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 +
9
10#include <boost/python/class.hpp>
11#include <boost/python/copy_const_reference.hpp>
12#include <boost/python/operators.hpp>
13#include <boost/python/register_ptr_to_python.hpp>
14#include <boost/python/self.hpp>
15
17using namespace boost::python;
18
20
22 register_ptr_to_python<Mantid::Kernel::PropertyHistory_sptr>();
23
24 class_<PropertyHistory>(
25 "PropertyHistory",
26 init<const std::string &, const std::string &, const std::string &, const bool, const unsigned int>())
27
28 .def("name", &PropertyHistory::name, arg("self"), return_value_policy<copy_const_reference>(),
29 "Returns the name of the property.")
30
31 .def("value", &PropertyHistory::value, arg("self"), return_value_policy<copy_const_reference>(),
32 "Returns the value of the property.")
33
34 .def("type", &PropertyHistory::type, arg("self"), return_value_policy<copy_const_reference>(),
35 "Returns the type of the property.")
36
37 .def("isDefault", &PropertyHistory::isDefault, arg("self"), "Returns if the property value is the default value.")
38
39 .def("direction", &PropertyHistory::direction, arg("self"), "Returns the direction of the property.")
40 // ----------------- Operators --------------------------------------
41 .def(self_ns::str(self));
42}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_PropertyHistory()
This class stores information about the parameters used by an algorithm.
unsigned int direction() const
get direction flag of algorithm parameter const
const std::string & name() const
get name of algorithm parameter const
const std::string & value() const
get value of algorithm parameter const
bool isDefault() const
get isdefault flag of algorithm parameter const
const std::string & type() const
get type of algorithm parameter const