cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
vctPythonUtilities.h File Reference
#include <Python.h>
#include <arrayobject.h>
#include <cisstCommon/cmnAssert.h>
#include <cisstCommon/cmnPortability.h>
#include <cisstVector/vctFixedSizeConstVectorBase.h>
#include <cisstVector/vctDynamicConstVectorBase.h>
#include <cisstVector/vctFixedSizeConstMatrixBase.h>
#include <cisstVector/vctDynamicConstMatrixBase.h>
#include <cisstVector/vctDynamicConstNArrayBase.h>
#include <cisstVector/vctTransformationTypes.h>

Go to the source code of this file.

Functions

bool vctThrowUnlessIsPyArray (PyObject *input)
 
template<class _elementType >
bool vctThrowUnlessIsSameTypeArray (PyObject *CMN_UNUSED(input))
 
template<>
bool vctThrowUnlessIsSameTypeArray< bool > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< char > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< unsigned char > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< short > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< unsigned short > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< int > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< unsigned int > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< long int > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< unsigned long int > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< float > (PyObject *input)
 
template<>
bool vctThrowUnlessIsSameTypeArray< double > (PyObject *input)
 
template<class _elementType >
int vctPythonType (void)
 
template<>
int vctPythonType< bool > (void)
 
template<>
int vctPythonType< char > (void)
 
template<>
int vctPythonType< unsigned char > (void)
 
template<>
int vctPythonType< short > (void)
 
template<>
int vctPythonType< unsigned short > (void)
 
template<>
int vctPythonType< int > (void)
 
template<>
int vctPythonType< unsigned int > (void)
 
template<>
int vctPythonType< long int > (void)
 
template<>
int vctPythonType< unsigned long int > (void)
 
template<>
int vctPythonType< double > (void)
 
bool vctThrowUnlessDimension1 (PyObject *input)
 
bool vctThrowUnlessDimension2 (PyObject *input)
 
template<vct::size_type _dimension>
bool vctThrowUnlessDimensionN (PyObject *input)
 
bool vctThrowUnlessIsWritable (PyObject *input)
 
template<vct::size_type _size, vct::stride_type _stride, class _elementType , class _dataPtrType >
bool vctThrowUnlessCorrectVectorSize (PyObject *input, const vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType > &target)
 
template<class _vectorOwnerType , typename _elementType >
bool vctThrowUnlessCorrectVectorSize (PyObject *CMN_UNUSED(input), const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &CMN_UNUSED(target))
 
template<vct::size_type _rows, vct::size_type _cols, vct::stride_type _rowStride, vct::stride_type _colStride, class _elementType , class _dataPtrType >
bool vctThrowUnlessCorrectMatrixSize (PyObject *input, const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &target)
 
template<class _matrixOwnerType , typename _elementType >
bool vctThrowUnlessCorrectMatrixSize (PyObject *CMN_UNUSED(input), const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &CMN_UNUSED(target))
 
bool vctThrowUnlessOwnsData (PyObject *input)
 
template<vct::size_type _size, vct::stride_type _stride, class _elementType , class _dataPtrType >
bool vctThrowUnlessOwnsData (PyObject *CMN_UNUSED(input), const vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType > &CMN_UNUSED(target))
 
template<class _vectorOwnerType , typename _elementType >
bool vctThrowUnlessOwnsData (PyObject *input, const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &CMN_UNUSED(target))
 
template<vct::size_type _rows, vct::size_type _cols, vct::stride_type _rowStride, vct::stride_type _colStride, class _elementType , class _dataPtrType >
bool vctThrowUnlessOwnsData (PyObject *CMN_UNUSED(input), const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &CMN_UNUSED(target))
 
template<class _matrixOwnerType , typename _elementType >
bool vctThrowUnlessOwnsData (PyObject *input, const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &CMN_UNUSED(target))
 
bool vctThrowUnlessNotReferenced (PyObject *input)
 
template<vct::size_type _size, vct::stride_type _stride, class _elementType , class _dataPtrType >
bool vctThrowUnlessNotReferenced (PyObject *CMN_UNUSED(input), const vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType > &CMN_UNUSED(target))
 
template<class _vectorOwnerType , typename _elementType >
bool vctThrowUnlessNotReferenced (PyObject *input, const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &CMN_UNUSED(target))
 
template<vct::size_type _rows, vct::size_type _cols, vct::stride_type _rowStride, vct::stride_type _colStride, class _elementType , class _dataPtrType >
bool vctThrowUnlessNotReferenced (PyObject *CMN_UNUSED(input), const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &CMN_UNUSED(target))
 
template<class _matrixOwnerType , typename _elementType >
bool vctThrowUnlessNotReferenced (PyObject *input, const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &CMN_UNUSED(target))
 

Function Documentation

template<class _elementType >
int vctPythonType ( void  )
template<>
int vctPythonType< bool > ( void  )
template<>
int vctPythonType< char > ( void  )
template<>
int vctPythonType< double > ( void  )
template<>
int vctPythonType< int > ( void  )
template<>
int vctPythonType< long int > ( void  )
template<>
int vctPythonType< short > ( void  )
template<>
int vctPythonType< unsigned char > ( void  )
template<>
int vctPythonType< unsigned int > ( void  )
template<>
int vctPythonType< unsigned long int > ( void  )
template<>
int vctPythonType< unsigned short > ( void  )
template<vct::size_type _rows, vct::size_type _cols, vct::stride_type _rowStride, vct::stride_type _colStride, class _elementType , class _dataPtrType >
bool vctThrowUnlessCorrectMatrixSize ( PyObject *  input,
const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &  target 
)
template<class _matrixOwnerType , typename _elementType >
bool vctThrowUnlessCorrectMatrixSize ( PyObject *  CMN_UNUSEDinput,
const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &  CMN_UNUSEDtarget 
)
template<vct::size_type _size, vct::stride_type _stride, class _elementType , class _dataPtrType >
bool vctThrowUnlessCorrectVectorSize ( PyObject *  input,
const vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType > &  target 
)
template<class _vectorOwnerType , typename _elementType >
bool vctThrowUnlessCorrectVectorSize ( PyObject *  CMN_UNUSEDinput,
const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &  CMN_UNUSEDtarget 
)
bool vctThrowUnlessDimension1 ( PyObject *  input)
bool vctThrowUnlessDimension2 ( PyObject *  input)
template<vct::size_type _dimension>
bool vctThrowUnlessDimensionN ( PyObject *  input)
bool vctThrowUnlessIsPyArray ( PyObject *  input)
template<class _elementType >
bool vctThrowUnlessIsSameTypeArray ( PyObject *  CMN_UNUSEDinput)
template<>
bool vctThrowUnlessIsSameTypeArray< bool > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< char > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< double > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< float > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< int > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< long int > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< short > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< unsigned char > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< unsigned int > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< unsigned long int > ( PyObject *  input)
template<>
bool vctThrowUnlessIsSameTypeArray< unsigned short > ( PyObject *  input)
bool vctThrowUnlessIsWritable ( PyObject *  input)
bool vctThrowUnlessNotReferenced ( PyObject *  input)
template<vct::size_type _size, vct::stride_type _stride, class _elementType , class _dataPtrType >
bool vctThrowUnlessNotReferenced ( PyObject *  CMN_UNUSEDinput,
const vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType > &  CMN_UNUSEDtarget 
)
template<class _vectorOwnerType , typename _elementType >
bool vctThrowUnlessNotReferenced ( PyObject *  input,
const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &  CMN_UNUSEDtarget 
)
template<vct::size_type _rows, vct::size_type _cols, vct::stride_type _rowStride, vct::stride_type _colStride, class _elementType , class _dataPtrType >
bool vctThrowUnlessNotReferenced ( PyObject *  CMN_UNUSEDinput,
const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &  CMN_UNUSEDtarget 
)
template<class _matrixOwnerType , typename _elementType >
bool vctThrowUnlessNotReferenced ( PyObject *  input,
const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &  CMN_UNUSEDtarget 
)
bool vctThrowUnlessOwnsData ( PyObject *  input)
template<vct::size_type _size, vct::stride_type _stride, class _elementType , class _dataPtrType >
bool vctThrowUnlessOwnsData ( PyObject *  CMN_UNUSEDinput,
const vctFixedSizeConstVectorBase< _size, _stride, _elementType, _dataPtrType > &  CMN_UNUSEDtarget 
)
template<class _vectorOwnerType , typename _elementType >
bool vctThrowUnlessOwnsData ( PyObject *  input,
const vctDynamicConstVectorBase< _vectorOwnerType, _elementType > &  CMN_UNUSEDtarget 
)
template<vct::size_type _rows, vct::size_type _cols, vct::stride_type _rowStride, vct::stride_type _colStride, class _elementType , class _dataPtrType >
bool vctThrowUnlessOwnsData ( PyObject *  CMN_UNUSEDinput,
const vctFixedSizeConstMatrixBase< _rows, _cols, _rowStride, _colStride, _elementType, _dataPtrType > &  CMN_UNUSEDtarget 
)
template<class _matrixOwnerType , typename _elementType >
bool vctThrowUnlessOwnsData ( PyObject *  input,
const vctDynamicConstMatrixBase< _matrixOwnerType, _elementType > &  CMN_UNUSEDtarget 
)