Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Mantid::PythonInterface::PythonObjectTypeValidator Class Reference

#include <PythonObjectTypeValidator.h>

Inheritance diagram for Mantid::PythonInterface::PythonObjectTypeValidator:
Mantid::Kernel::IValidator

Public Member Functions

IValidator_sptr clone () const override
 Make a copy of the present type of validator.
 
 PythonObjectTypeValidator ()
 
 PythonObjectTypeValidator (object const &pyclass)
 
 ~PythonObjectTypeValidator () override=default
 
- Public Member Functions inherited from Mantid::Kernel::IValidator
virtual std::vector< std::string > allowedValues () const
 The set of allowed values that this validator may have, if a discrete set exists.
 
virtual std::string getValueForAlias (const std::string &alias) const
 Implement this method for validators which wish to support aliasing for alloeed values.
 
virtual bool isMultipleSelectionAllowed ()
 Is Multiple Selection Allowed.
 
std::string isValid (const char *value) const
 Deal with a C-style string by first converting it to a std::string so that boost::any can deal with it, calls isValid(std::string)
 
template<typename TYPE >
std::string isValid (const TYPE &value) const
 Calls the validator.
 
 IValidator ()=default
 Constructor.
 
virtual ~IValidator ()=default
 virtual Destructor
 

Private Member Functions

std::string check (boost::any const &value) const override
 Checks the value based on the validator's rules.
 

Private Attributes

object pythonClass
 

Detailed Description

Definition at line 41 of file PythonObjectTypeValidator.h.

Constructor & Destructor Documentation

◆ PythonObjectTypeValidator() [1/2]

Mantid::PythonInterface::PythonObjectTypeValidator::PythonObjectTypeValidator ( )
inline

Definition at line 44 of file PythonObjectTypeValidator.h.

◆ PythonObjectTypeValidator() [2/2]

Mantid::PythonInterface::PythonObjectTypeValidator::PythonObjectTypeValidator ( object const &  pyclass)
inline

Definition at line 46 of file PythonObjectTypeValidator.h.

◆ ~PythonObjectTypeValidator()

Mantid::PythonInterface::PythonObjectTypeValidator::~PythonObjectTypeValidator ( )
overridedefault

Member Function Documentation

◆ check()

std::string Mantid::PythonInterface::PythonObjectTypeValidator::check ( boost::any const &  ) const
overrideprivatevirtual

Checks the value based on the validator's rules.

Returns
An error message to display to users or an empty string on no error

Implements Mantid::Kernel::IValidator.

Definition at line 11 of file PythonObjectTypeValidator.cpp.

References check(), obj, pythonClass, and value.

Referenced by check().

◆ clone()

IValidator_sptr Mantid::PythonInterface::PythonObjectTypeValidator::clone ( ) const
inlineoverridevirtual

Make a copy of the present type of validator.

Implements Mantid::Kernel::IValidator.

Definition at line 50 of file PythonObjectTypeValidator.h.

Member Data Documentation

◆ pythonClass

object Mantid::PythonInterface::PythonObjectTypeValidator::pythonClass
private

Definition at line 53 of file PythonObjectTypeValidator.h.

Referenced by check().


The documentation for this class was generated from the following files: