#include "PyROOT.h"#include "PyStrings.h"#include "Converters.h"#include "ObjectProxy.h"#include "PyBufferFactory.h"#include "TCustomPyTypes.h"#include "Utility.h"#include "RootWrapper.h"#include "TClass.h"#include "TClassEdit.h"#include "Api.h"#include <limits.h>#include <string.h>#include <utility>#include <sstream>Go to the source code of this file.
Defines | |
| #define | PYROOT_IMPLEMENT_BASIC_CONVERTER(name, type, stype, F1, F2) |
| #define | PYROOT_IMPLEMENT_BASIC_REF_CONVERTER(name) |
| #define | PYROOT_IMPLEMENT_BASIC_CHAR_CONVERTER(name, type, low, high) |
| #define | PYROOT_IMPLEMENT_ARRAY_CONVERTER(name, type, code) |
| #define | PYROOT_IMPLEMENT_STRING_AS_PRIMITIVE_CONVERTER(name, strtype, DF1) |
| #define | PYROOT_BASIC_CONVERTER_FACTORY(name) |
| #define | PYROOT_ARRAY_CONVERTER_FACTORY(name) |
Typedefs | |
| typedef std::pair< const char *, ConverterFactory_t > | NFp_t |
Functions | |
| Bool_t | CArraySetArg (PyObject *pyobject, PyROOT::TParameter ¶, G__CallFunc *func, char tc, int size) |
| PyROOT::TConverter * | PyROOT::CreateConverter (const std::string &fullType, Long_t user) |
Variables | |
| NFp_t | factories_ [] |
| { ... } ::InitConvFactories_t | initConvFactories_ |
| #define PYROOT_ARRAY_CONVERTER_FACTORY | ( | name | ) |
| #define PYROOT_BASIC_CONVERTER_FACTORY | ( | name | ) |
Value:
Bool_t PyROOT::T##name##ArrayConverter::SetArg( \ PyObject* pyobject, TParameter& para, G__CallFunc* func, Long_t ) \ { \ return CArraySetArg( pyobject, para, func, code, sizeof(type) ); \ } \ \ PyObject* PyROOT::T##name##ArrayConverter::FromMemory( void* address ) \ { \ return BufFac_t::Instance()->PyBuffer_FromMemory( *(type**)address, fSize );\ } \ \ Bool_t PyROOT::T##name##ArrayConverter::ToMemory( PyObject* value, void* address )\ { \ void* buf = 0; \ int buflen = Utility::GetBuffer( value, code, sizeof(type), buf ); \ if ( ! buf || buflen == 0 ) \ return kFALSE; \ if ( 0 <= fSize ) { \ if ( fSize < buflen/(int)sizeof(type) ) { \ PyErr_SetString( PyExc_ValueError, "buffer too large for value" ); \ return kFALSE; \ } \ memcpy( *(type**)address, buf, 0 < buflen ? ((size_t) buflen) : sizeof(type) );\ } else \ *(type**)address = (type*)buf; \ return kTRUE; \ }
Definition at line 661 of file Converters.cxx.
Definition at line 78 of file Converters.cxx.
Value:
PyObject* PyROOT::T##name##Converter::FromMemory( void* address ) \ { \ return F1( (stype)*((type*)address) ); \ } \ \ Bool_t PyROOT::T##name##Converter::ToMemory( PyObject* value, void* address ) \ { \ type s = (type)F2( value ); \ if ( s == (type)-1 && PyErr_Occurred() ) \ return kFALSE; \ *((type*)address) = (type)s; \ return kTRUE; \ }
Definition at line 50 of file Converters.cxx.
| #define PYROOT_IMPLEMENT_BASIC_REF_CONVERTER | ( | name | ) |
| #define PYROOT_IMPLEMENT_STRING_AS_PRIMITIVE_CONVERTER | ( | name, | |||
| strtype, | |||||
| DF1 | ) |
Definition at line 716 of file Converters.cxx.
typedef std::pair< const char*, ConverterFactory_t > NFp_t [static] |
Definition at line 1118 of file Converters.cxx.
| Bool_t @14::CArraySetArg | ( | PyObject * | pyobject, | |
| PyROOT::TParameter & | para, | |||
| G__CallFunc * | func, | |||
| char | tc, | |||
| int | size | |||
| ) | [inline, static] |
Definition at line 527 of file Converters.cxx.
References func(), PyROOT::Utility::GetBuffer(), kFALSE, kTRUE, and para().
Referenced by PyROOT::TNonConstCStringConverter::SetArg().
NFp_t factories_[] [static] |
Definition at line 1120 of file Converters.cxx.
struct { ... } InitConvFactories_t initConvFactories_ [static] |
1.5.1