Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
Mantid::PythonInterface::IPyTypeVisitor Class Referenceabstract

#include <PyNativeTypeExtractor.h>

Inheritance diagram for Mantid::PythonInterface::IPyTypeVisitor:

Public Member Functions

virtual void operator() (bool value) const =0
 
virtual void operator() (double value) const =0
 
virtual void operator() (long value) const =0
 
virtual void operator() (Mantid::API::Workspace_sptr) const =0
 
virtual void operator() (std::string) const =0
 
virtual void operator() (std::vector< bool >) const =0
 
virtual void operator() (std::vector< double >) const =0
 
virtual void operator() (std::vector< long >) const =0
 
void operator() (std::vector< PyNativeTypeExtractor::PythonOutputT > const &values) const
 
virtual void operator() (std::vector< std::string >) const =0
 
virtual ~IPyTypeVisitor ()=default
 Dynamically dispatches to overloaded operator depending on the underlying type. More...
 

Private Member Functions

template<typename ScalarT >
void applyVectorProp (const std::vector< Mantid::PythonInterface::PyNativeTypeExtractor::PythonOutputT > &values) const
 

Detailed Description

Definition at line 67 of file PyNativeTypeExtractor.h.

Constructor & Destructor Documentation

◆ ~IPyTypeVisitor()

virtual Mantid::PythonInterface::IPyTypeVisitor::~IPyTypeVisitor ( )
virtualdefault

Dynamically dispatches to overloaded operator depending on the underlying type.

This also handles cases such as std::vector<T>, or nested lists, which will be flattened by invoking the operator each time for each elem. This assumes all element in a list matches the first element type found in that list, where this is not true, the element will be cast to the first element type.

Note: you will need to include using Mantid::PythonInterface::IPyTypeVisitor::operator();

Member Function Documentation

◆ applyVectorProp()

template<typename ScalarT >
void Mantid::PythonInterface::IPyTypeVisitor::applyVectorProp ( const std::vector< Mantid::PythonInterface::PyNativeTypeExtractor::PythonOutputT > &  values) const
inlineprivate

Definition at line 117 of file PyNativeTypeExtractor.h.

References operator()().

◆ operator()() [1/10]

virtual void Mantid::PythonInterface::IPyTypeVisitor::operator() ( bool  value) const
pure virtual

Referenced by applyVectorProp().

◆ operator()() [2/10]

virtual void Mantid::PythonInterface::IPyTypeVisitor::operator() ( double  value) const
pure virtual

◆ operator()() [3/10]

virtual void Mantid::PythonInterface::IPyTypeVisitor::operator() ( long  value) const
pure virtual

◆ operator()() [4/10]

virtual void Mantid::PythonInterface::IPyTypeVisitor::operator() ( Mantid::API::Workspace_sptr  ) const
pure virtual

◆ operator()() [5/10]

virtual void Mantid::PythonInterface::IPyTypeVisitor::operator() ( std::string  ) const
pure virtual

◆ operator()() [6/10]

virtual void Mantid::PythonInterface::IPyTypeVisitor::operator() ( std::vector< bool >  ) const
pure virtual

◆ operator()() [7/10]

virtual void Mantid::PythonInterface::IPyTypeVisitor::operator() ( std::vector< double >  ) const
pure virtual

◆ operator()() [8/10]

virtual void Mantid::PythonInterface::IPyTypeVisitor::operator() ( std::vector< long >  ) const
pure virtual

◆ operator()() [9/10]

void Mantid::PythonInterface::IPyTypeVisitor::operator() ( std::vector< PyNativeTypeExtractor::PythonOutputT > const &  values) const
inline

Definition at line 92 of file PyNativeTypeExtractor.h.

◆ operator()() [10/10]

virtual void Mantid::PythonInterface::IPyTypeVisitor::operator() ( std::vector< std::string >  ) const
pure virtual

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