11#include <boost/python/extract.hpp>
14using boost::python::extract;
15using boost::python::handle;
16using boost::python::object;
19using Kernel::Direction;
20using Kernel::PropertyManager;
22namespace PythonInterface::Registry {
29 auto pmgr = std::make_shared<PropertyManager>();
30 object view(mapping.attr(
"items")());
31 object itemIter(handle<>(PyObject_GetIter(view.ptr())));
32 auto length = len(mapping);
33 for (ssize_t i = 0; i < length; ++i) {
34 const object keyValue(handle<>(PyIter_Next(itemIter.ptr())));
35 const std::string cppkey = extract<std::string>(keyValue[0])();
static std::unique_ptr< Kernel::Property > create(const std::string &name, const boost::python::object &defaultValue, const boost::python::object &validator, const unsigned int direction)
Creates a PropertyWithValue<Type> instance from the given information.
MANTID_KERNEL_DLL PropertyManager_sptr createPropertyManager(const Json::Value &keyValues)
Attempt to create a PropertyManager from the Json::Value.
Helper class which provides the Collimation Length for SANS instruments.
@ Input
An input workspace.