Mantid
Loading...
Searching...
No Matches
Macros | Functions
BoundedValidator.cpp File Reference
#include "MantidKernel/BoundedValidator.h"
#include "MantidPythonInterface/core/IsNone.h"
#include <boost/python/class.hpp>
#include <boost/python/default_call_policies.hpp>
#include <boost/python/make_constructor.hpp>
#include <boost/python/overloads.hpp>

Go to the source code of this file.

Macros

#define EXPORT_BOUNDEDVALIDATOR(ElementType, prefix)
 A macro for generating exports for each type. More...
 

Functions

void export_BoundedValidator ()
 

Macro Definition Documentation

◆ EXPORT_BOUNDEDVALIDATOR

#define EXPORT_BOUNDEDVALIDATOR (   ElementType,
  prefix 
)
Value:
class_<BoundedValidator<ElementType>, bases<IValidator>, boost::noncopyable>(#prefix "BoundedValidator") \
.def("__init__", make_constructor(&createBoundedValidator<ElementType>, default_call_policies(), \
(arg("lower") = object(), arg("upper") = object()))) \
.def("__init__", make_constructor(&createExclusiveBoundedValidator<ElementType>, default_call_policies(), \
(arg("lower") = object(), arg("upper") = object(), arg("exclusive") = false))) \
.def("setLower", &BoundedValidator<ElementType>::setLower, (arg("self"), arg("lower")), "Set the lower bound") \
.def("setUpper", &BoundedValidator<ElementType>::setUpper, (arg("self"), arg("upper")), "Set the upper bound") \
.def("setLowerExclusive", &BoundedValidator<ElementType>::setLowerExclusive, (arg("self"), arg("exclusive")), \
"Sets if the lower bound is exclusive") \
.def("setUpperExclusive", &BoundedValidator<ElementType>::setUpperExclusive, (arg("self"), arg("exclusive")), \
"Sets if the upper bound is exclsuive") \
.def("setExclusive", &BoundedValidator<ElementType>::setExclusive, (arg("self"), arg("exclusive")), \
"Sets both bounds to be inclusive/exclusive") \
.def("lower", &BoundedValidator<ElementType>::lower, arg("self"), "Returns the lower bound") \
.def("upper", &BoundedValidator<ElementType>::upper, arg("self"), "Returns the upper bound") \
.def("setBounds", &BoundedValidator<ElementType>::setBounds, (arg("self"), arg("lower"), arg("upper")), \
"Set both bounds") \
.def("hasLower", &BoundedValidator<ElementType>::hasLower, arg("self"), \
"Returns True if a lower bound has been set") \
.def("hasUpper", &BoundedValidator<ElementType>::hasUpper, arg("self"), \
"Returns True if an upper bound has been set") \
.def("isLowerExclusive", &BoundedValidator<ElementType>::isLowerExclusive, arg("self"), \
"Returns True if the lower bound is exclusive") \
.def("isUpperExclusive", &BoundedValidator<ElementType>::isUpperExclusive, arg("self"), \
"Returns True if the upper bound is exclusive");
BoundedValidator is a validator that requires the values to be between upper or lower bounds,...

A macro for generating exports for each type.

Definition at line 59 of file BoundedValidator.cpp.

Function Documentation

◆ export_BoundedValidator()

void export_BoundedValidator ( )

Definition at line 87 of file BoundedValidator.cpp.

References EXPORT_BOUNDEDVALIDATOR.