17#include <boost/python/call_method.hpp>
18#include <boost/python/converter/arg_from_python.hpp>
19#include <boost/python/extract.hpp>
30template <typename ValueType, typename Enable =
void>
55 std::unique_ptr<Kernel::Property>
create(
const std::string &
name,
const boost::python::object &defaultValue,
56 const boost::python::object &validator,
57 const unsigned int direction)
const override {
58 using boost::python::extract;
61 const ValueType valueInC = extract<ValueType>(defaultValue)();
62 std::unique_ptr<Kernel::Property> valueProp;
64 valueProp = std::make_unique<PropertyWithValue<ValueType>>(
name, valueInC, direction);
66 const IValidator *propValidator = extract<IValidator *>(validator);
67 valueProp = std::make_unique<PropertyWithValue<ValueType>>(
name, valueInC, propValidator->
clone(), direction);
double value
The value of the point.
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
#define GNU_DIAG_OFF(x)
This is a collection of macros for turning compiler warnings off in a controlled manner.
Interface to PropertyManager.
IPropertyManager * setProperty(const std::string &name, const T &value)
Templated method to set the value of a PropertyWithValue.
IValidator is the basic interface for all validators for properties.
virtual IValidator_sptr clone() const =0
Make a copy of the present type of validator.
The concrete, templated class for properties.
bool isNone(const PyObject *ptr)
This class provides a base-class objects that are able to take a python object and set it on an algor...
This class provides a templated class object that is able to take a python object and perform operati...
ValueType HeldType
Type required by TypeRegistry framework.
void set(Kernel::IPropertyManager *alg, const std::string &name, const boost::python::object &value) const override
Set function to handle Python -> C++ calls and get the correct type.
std::unique_ptr< Kernel::Property > create(const std::string &name, const boost::python::object &defaultValue, const boost::python::object &validator, const unsigned int direction) const override
Create a PropertyWithValue from the given python object value.