Logo ROOT  
Reference Guide
DeclareConverters.h File Reference
#include "Converters.h"
#include <complex>
#include <string>
#include "ROOT/RStringView.hxx"
#include "TString.h"
Include dependency graph for DeclareConverters.h:
This graph shows which files directly or indirectly include this file:

Namespaces

 CPyCppyy
 Set of helper functions that are invoked from the pythonizors, on the Python side.
 

Macros

#define CPPYY_DECLARE_ARRAY_CONVERTER(name)
 
#define CPPYY_DECLARE_BASIC_CONVERTER(name)
 
#define CPPYY_DECLARE_BASIC_CONVERTER2(name, base)
 
#define CPPYY_DECLARE_REFCONVERTER(name)
 
#define CPPYY_DECLARE_STRING_CONVERTER(name, strtype)
 

Macro Definition Documentation

◆ CPPYY_DECLARE_ARRAY_CONVERTER

#define CPPYY_DECLARE_ARRAY_CONVERTER (   name)
Value:
class name##ArrayConverter : public Converter { \
public: \
name##ArrayConverter(dims_t shape); \
name##ArrayConverter(const name##ArrayConverter&) = delete; \
name##ArrayConverter& operator=(const name##ArrayConverter&) = delete; \
virtual ~name##ArrayConverter() { delete [] fShape; } \
virtual bool SetArg(PyObject*, Parameter&, CallContext* = nullptr); \
virtual PyObject* FromMemory(void*); \
virtual bool ToMemory(PyObject*, void*); \
virtual bool HasState() { return true; } \
protected: \
Py_ssize_t* fShape; \
}; \
\
class name##ArrayPtrConverter : public name##ArrayConverter { \
public: \
using name##ArrayConverter::name##ArrayConverter; \
virtual bool SetArg(PyObject*, Parameter&, CallContext* = nullptr); \
};

Definition at line 55 of file DeclareConverters.h.

◆ CPPYY_DECLARE_BASIC_CONVERTER

#define CPPYY_DECLARE_BASIC_CONVERTER (   name)
Value:
class name##Converter : public Converter { \
public: \
virtual bool SetArg(PyObject*, Parameter&, CallContext* = nullptr); \
virtual PyObject* FromMemory(void*); \
virtual bool ToMemory(PyObject*, void*); \
}; \
\
class Const##name##RefConverter : public Converter { \
public: \
virtual bool SetArg(PyObject*, Parameter&, CallContext* = nullptr); \
virtual PyObject* FromMemory(void*); \
}

Definition at line 20 of file DeclareConverters.h.

◆ CPPYY_DECLARE_BASIC_CONVERTER2

#define CPPYY_DECLARE_BASIC_CONVERTER2 (   name,
  base 
)
Value:
class name##Converter : public base##Converter { \
public: \
virtual PyObject* FromMemory(void*); \
virtual bool ToMemory(PyObject*, void*); \
}; \
\
class Const##name##RefConverter : public Converter { \
public: \
virtual bool SetArg(PyObject*, Parameter&, CallContext* = nullptr); \
virtual PyObject* FromMemory(void*); \
}

Definition at line 35 of file DeclareConverters.h.

◆ CPPYY_DECLARE_REFCONVERTER

#define CPPYY_DECLARE_REFCONVERTER (   name)
Value:
class name##RefConverter : public Converter { \
public: \
virtual bool SetArg(PyObject*, Parameter&, CallContext* = nullptr); \
virtual PyObject* FromMemory(void*); \
};

Definition at line 48 of file DeclareConverters.h.

◆ CPPYY_DECLARE_STRING_CONVERTER

#define CPPYY_DECLARE_STRING_CONVERTER (   name,
  strtype 
)
Value:
class name##Converter : public InstanceConverter { \
public: \
name##Converter(bool keepControl = true); \
public: \
virtual bool SetArg(PyObject*, Parameter&, CallContext* = nullptr); \
virtual PyObject* FromMemory(void* address); \
virtual bool ToMemory(PyObject* value, void* address); \
protected: \
strtype fBuffer; \
}

Definition at line 348 of file DeclareConverters.h.

Variable Documentation

◆ fBuffer

std::complex<double> fBuffer
protected

Definition at line 140 of file DeclareConverters.h.

◆ fClass

Cppyy::TCppType_t fClass
protected

Definition at line 259 of file DeclareConverters.h.

◆ fConverter

Converter* fConverter
protected

Definition at line 410 of file DeclareConverters.h.

◆ fFuncWrap

PyObject* fFuncWrap
protected

Definition at line 411 of file DeclareConverters.h.

◆ fIsConst

bool fIsConst
protected

Definition at line 260 of file DeclareConverters.h.

◆ fIsRef

bool fIsRef
protected

Definition at line 437 of file DeclareConverters.h.

◆ fKeepControl

bool fKeepControl
protected

Definition at line 436 of file DeclareConverters.h.

◆ fMaxSize

long fMaxSize
protected

Definition at line 141 of file DeclareConverters.h.

◆ fRetType

std::string fRetType
protected

Definition at line 391 of file DeclareConverters.h.

◆ fSignature

std::string fSignature
protected

Definition at line 392 of file DeclareConverters.h.

◆ fSize

size_t fSize
protected

Definition at line 342 of file DeclareConverters.h.

◆ fSmartPtrType

Cppyy::TCppType_t fSmartPtrType
protected

Definition at line 434 of file DeclareConverters.h.

◆ fUnderlyingType

Cppyy::TCppType_t fUnderlyingType
protected

Definition at line 435 of file DeclareConverters.h.

◆ fValueSize

size_t fValueSize
protected

Definition at line 456 of file DeclareConverters.h.

◆ m_dims

dims_t m_dims
protected

Definition at line 302 of file DeclareConverters.h.

PyObject
_object PyObject
Definition: PyMethodBase.h:42
fBuffer
std::string fBuffer
Definition: DeclareConverters.h:140
operator=
Binding & operator=(OUT(*fun)(void))
Definition: TRInterface_Binding.h:11
name
char name[80]
Definition: TGX11.cxx:110
CPyCppyy::Parameter
Definition: callcontext.h:13
int