Mantid
Loading...
Searching...
No Matches
PropertyWithValueFactory.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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//-----------------------------------------------------------------------------
13#include <boost/python/list.hpp>
14#include <memory>
15
16namespace Mantid {
17//---------------------------------------------------------------------------
18// Forward declarations
19//---------------------------------------------------------------------------
20namespace Kernel {
21class Property;
22}
23
24namespace PythonInterface {
25namespace Registry {
31public:
32 static std::unique_ptr<Kernel::Property> create(const std::string &name, const boost::python::object &defaultValue,
33 const boost::python::object &validator, const unsigned int direction);
34
35 static std::unique_ptr<Kernel::Property> create(const std::string &name, const boost::python::object &defaultValue,
36 const unsigned int direction);
37
38 static std::unique_ptr<Kernel::Property> createTimeSeries(const std::string &name,
39 const boost::python::list &defaultValue);
40
41private:
43 static const PropertyValueHandler &lookup(PyObject *const object);
45 static const std::string isArray(PyObject *const object);
46};
47} // namespace Registry
48} // namespace PythonInterface
49} // namespace Mantid
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
Definition: System.h:53
Defines a static factory class that creates PropertyWithValue instances from python objects.
std::unique_ptr< T > create(const P &parent, const IndexArg &indexArg, const HistArg &histArg)
This is the create() method that all the other create() methods call.
Helper class which provides the Collimation Length for SANS instruments.
This class provides a base-class objects that are able to take a python object and set it on an algor...