IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Macros | Functions
PythonDataItemMacros.h File Reference

Macros set used to wrap IPSDK data items to python. More...

#include <Python/PyIPSDKBase/PythonMacros.h>
#include <Python/PyIPSDKBase/PythonDataItemUtils.h>
#include <boost/shared_ptr.hpp>
#include <boost/noncopyable.hpp>

Go to the source code of this file.

Macros

#define IPSDK_PYTHON_DATAITEM_WRAPPER_BOOST_WORKAROUND(dataItemName)
 [Internal] macro to avoid link errors generated by VC2015 SP3 when IPSDK_PYTHON_DATAITEM_WRAPPER is used
 
#define IPSDK_PYTHON_DATAITEM_WRAPPER(dataItemName)
 macro allowing to wrap an IPSDK data item to python More...
 

Functions

template<typename DataItemType >
boost::shared_ptr< DataItemType > duplicateDataItem (const DataItemType &inputDataItem)
 template function allowing to duplicate a typed dataitem
 
template<typename DataItemType >
boost::enable_if_c< boost::is_base_of< ipsdk::BaseDataItem, DataItemType >::value, std::ostream & >::type std::operator<< (std::ostream &os, const DataItemType &dataItem)
 

Detailed Description

Macros set used to wrap IPSDK data items to python.

Author
E. Noirfalise
Date
2015/12/03

Macro Definition Documentation

◆ IPSDK_PYTHON_DATAITEM_WRAPPER

#define IPSDK_PYTHON_DATAITEM_WRAPPER (   dataItemName)
Value:
boost::python::implicitly_convertible<boost::shared_ptr<dataItemName>, \
boost::shared_ptr<const dataItemName> >(); \
boost::python::implicitly_convertible<boost::shared_ptr<dataItemName>, \
boost::python::implicitly_convertible<boost::shared_ptr<dataItemName>, \
boost::python::implicitly_convertible<boost::shared_ptr<dataItemName>, \
boost::python::implicitly_convertible<boost::shared_ptr<dataItemName>, \
IPSDK_PYTHON_DATAITEM_WRAPPER_BOOST_WORKAROUND(dataItemName) \
typedef boost::python::class_<dataItemName, \
bases<ipsdk::BaseDataItem>, \
boost::shared_ptr<dataItemName>, \
boost::noncopyable> BOOST_PP_CAT(Py, dataItemName); \
BOOST_PP_CAT(Py, dataItemName) BOOST_PP_CAT(py, dataItemName)( \
BOOST_PP_STRINGIZE(dataItemName), \
dataItemName::getToolTipStr().c_str(), \
boost::python::no_init); \
ipsdk::python::DataItemNodeRegistrator<0, dataItemName>::registerNode(BOOST_PP_CAT(py, dataItemName)); \
BOOST_PP_CAT(py, dataItemName) \
.def("duplicate", duplicateDataItem<dataItemName>, "duplicate existing data item") \
.def(self_ns::str(self_ns::self)) \
.add_property("toolTip", \
boost::python::make_function(&dataItemName::getToolTip, \
boost::python::return_internal_reference<>()), \
"retrieve object tool tip")
boost::shared_ptr< const BaseDataItemNode > DataItemNodeConstPtr
shared pointer to const DataItemNode
Definition: DataItemTypes.h:161
boost::shared_ptr< const BaseDataItem > DataItemConstPtr
shared pointer to const DataItem
Definition: DataItemTypes.h:149
boost::shared_ptr< BaseDataItem > DataItemPtr
shared pointer to DataItem
Definition: DataItemTypes.h:146
boost::shared_ptr< BaseDataItemNode > DataItemNodePtr
shared pointer to DataItemNode
Definition: DataItemTypes.h:158

macro allowing to wrap an IPSDK data item to python