Mantid
|
#include <RegisterWorkspacePtrToPython.h>
Public Types | |
using | HeldType = std::shared_ptr< T > |
Type required by TypeRegistry framework. More... | |
using | PointeeType = T |
Convenience typedef. More... | |
using | PropertyValueType = std::shared_ptr< T > |
Convenience typedef. More... | |
Public Member Functions | |
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. More... | |
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. More... | |
Public Member Functions inherited from Mantid::PythonInterface::Registry::PropertyValueHandler | |
virtual std::unique_ptr< Kernel::Property > | create (const std::string &name, const boost::python::object &value, const boost::python::object &validator, const unsigned int direction) const =0 |
Overload to create a Property type from the given value with no validation. More... | |
virtual void | set (Kernel::IPropertyManager *alg, const std::string &name, const boost::python::object &value) const =0 |
Overload to set the named property's value on the property manager. More... | |
virtual | ~PropertyValueHandler ()=default |
Virtual Destructor. More... | |
Definition at line 20 of file RegisterWorkspacePtrToPython.h.
using Mantid::PythonInterface::Registry::TypedPropertyValueHandler< std::shared_ptr< T >, std::enable_if< std::is_base_of< API::Workspace, T >::value >::type >::HeldType = std::shared_ptr<T> |
Type required by TypeRegistry framework.
Definition at line 24 of file RegisterWorkspacePtrToPython.h.
using Mantid::PythonInterface::Registry::TypedPropertyValueHandler< std::shared_ptr< T >, std::enable_if< std::is_base_of< API::Workspace, T >::value >::type >::PointeeType = T |
Convenience typedef.
Definition at line 27 of file RegisterWorkspacePtrToPython.h.
using Mantid::PythonInterface::Registry::TypedPropertyValueHandler< std::shared_ptr< T >, std::enable_if< std::is_base_of< API::Workspace, T >::value >::type >::PropertyValueType = std::shared_ptr<T> |
Convenience typedef.
Definition at line 29 of file RegisterWorkspacePtrToPython.h.
|
inlineoverridevirtual |
Create a PropertyWithValue from the given python object value.
name | :: The name of the property |
defaultValue | :: The defaultValue of the property. The object attempts to extract a value of type ValueType from the python object |
validator | :: A python object pointing to a validator instance, which can be None. |
direction | :: The direction of the property |
Implements Mantid::PythonInterface::Registry::PropertyValueHandler.
Definition at line 55 of file RegisterWorkspacePtrToPython.h.
References Mantid::Kernel::IValidator::clone(), and Mantid::PythonInterface::isNone().
|
inlineoverridevirtual |
Set function to handle Python -> C++ calls and get the correct type.
alg | :: A pointer to an IPropertyManager |
name | :: The name of the property |
value | :: A boost python object that stores the value |
Implements Mantid::PythonInterface::Registry::PropertyValueHandler.
Definition at line 37 of file RegisterWorkspacePtrToPython.h.
References Mantid::Kernel::IPropertyManager::setProperty(), and value.