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

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

Macros

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

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, bool init = true); \
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*, PyObject* = nullptr); \
virtual bool HasState() { return true; } \
protected: \
Py_ssize_t* fShape; \
bool fIsFixed; \
}; \
\
class name##ArrayPtrConverter : public name##ArrayConverter { \
public: \
using name##ArrayConverter::name##ArrayConverter; \
virtual bool SetArg(PyObject*, Parameter&, CallContext* = nullptr); \
};
dim_t * dims_t
Definition: CPyCppyy.h:65
_object PyObject
Definition: PyResult.h:13
Binding & operator=(OUT(*fun)(void))
static const std::string name("name")

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*, PyObject* = nullptr); \
}; \
\
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*, PyObject* = nullptr); \
}; \
\
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*, void*, PyObject* = nullptr); \
protected: \
strtype fBuffer; \
}
std::string fBuffer

Definition at line 349 of file DeclareConverters.h.

Variable Documentation

◆ fBuffer

std::complex<double> fBuffer
protected

Definition at line 141 of file DeclareConverters.h.

◆ fClass

Cppyy::TCppType_t fClass
protected

Definition at line 260 of file DeclareConverters.h.

◆ fConverter

Converter* fConverter
protected

Definition at line 411 of file DeclareConverters.h.

◆ fFuncWrap

PyObject* fFuncWrap
protected

Definition at line 412 of file DeclareConverters.h.

◆ fIsConst

bool fIsConst
protected

Definition at line 261 of file DeclareConverters.h.

◆ fIsRef

bool fIsRef
protected

Definition at line 438 of file DeclareConverters.h.

◆ fKeepControl

bool fKeepControl
protected

Definition at line 437 of file DeclareConverters.h.

◆ fMaxSize

long fMaxSize
protected

Definition at line 142 of file DeclareConverters.h.

◆ fRetType

std::string fRetType
protected

Definition at line 392 of file DeclareConverters.h.

◆ fSignature

std::string fSignature
protected

Definition at line 393 of file DeclareConverters.h.

◆ fSize

size_t fSize
protected

Definition at line 343 of file DeclareConverters.h.

◆ fSmartPtrType

Cppyy::TCppType_t fSmartPtrType
protected

Definition at line 435 of file DeclareConverters.h.

◆ fUnderlyingType

Cppyy::TCppType_t fUnderlyingType
protected

Definition at line 436 of file DeclareConverters.h.

◆ fValueSize

size_t fValueSize
protected

Definition at line 457 of file DeclareConverters.h.

◆ m_dims

dims_t m_dims
protected

Definition at line 303 of file DeclareConverters.h.