Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::PythonInterface::ExtractSharedPtr< T > Struct Template Reference

#include <ExtractSharedPtr.h>

Public Member Functions

bool check () const noexcept
 
 ExtractSharedPtr (const boost::python::object &pyvalue) noexcept
 
 ExtractSharedPtr (PyObject *pyvalue) noexcept
 
const std::shared_ptr< T > operator() () const
 

Private Attributes

std::shared_ptr< T > m_value
 

Detailed Description

template<typename T>
struct Mantid::PythonInterface::ExtractSharedPtr< T >

Definition at line 15 of file ExtractSharedPtr.h.

Constructor & Destructor Documentation

◆ ExtractSharedPtr() [1/2]

template<typename T >
Mantid::PythonInterface::ExtractSharedPtr< T >::ExtractSharedPtr ( const boost::python::object &  pyvalue)
inlineexplicitnoexcept

Definition at line 16 of file ExtractSharedPtr.h.

◆ ExtractSharedPtr() [2/2]

template<typename T >
Mantid::PythonInterface::ExtractSharedPtr< T >::ExtractSharedPtr ( PyObject *  pyvalue)
explicitnoexcept
Parameters
pyvaluePython object from which to attempt extraction of an object of type T

Definition at line 29 of file ExtractSharedPtr.h.

References m_value.

Member Function Documentation

◆ check()

template<typename T >
bool Mantid::PythonInterface::ExtractSharedPtr< T >::check ( ) const
inlinenoexcept

◆ operator()()

template<typename T >
const std::shared_ptr< T > Mantid::PythonInterface::ExtractSharedPtr< T >::operator()
Returns
The extracted shared_ptr or throws std::invalid_argument

Definition at line 52 of file ExtractSharedPtr.h.

References m_value.

Member Data Documentation

◆ m_value

template<typename T >
std::shared_ptr<T> Mantid::PythonInterface::ExtractSharedPtr< T >::m_value
private

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