Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
interop_wrapper.cxx File Reference
#include "precommondefs.h"
#include "cppjit_interop.h"
#include "callcontext.h"
#include "TClass.h"
#include "TInterpreter.h"
#include "TROOT.h"
#include "TSystem.h"
#include <algorithm>
#include <array>
#include <cassert>
#include <csignal>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <mutex>
#include <new>
#include <regex>
#include <set>
#include <sstream>
#include <stdexcept>
#include <typeinfo>
#include <vector>
Include dependency graph for interop_wrapper.cxx:

Classes

class  RInterOpMutex
 

Macros

#define _CRT_SECURE_NO_WARNINGS
 
#define _IMP_CALL_PRINT_STMT(type)
 
#define CPPJIT_IMP_CALL(typecode, rtype)
 

Typedefs

typedef cppjit::cpyrt::Parameter Parameter
 

Functions

static size_t CALL_NARGS (size_t nargs)
 
template<typename T >
static T CallT (interop::TCppMethod_t method, interop::TCppObject_t self, size_t nargs, void *args)
 
static bool copy_args (Parameter *args, size_t nargs, void **vargs)
 
static char * cppstring_to_cstring (const std::string &cppstr)
 
static std::string cppyy_normalize_name (std::string name)
 
static Cpp::JitCall destructor_callable (interop::TCppScope_t scope)
 
interop::TCppScope_t GetEnumFromCompleteName (const std::string &name)
 
interop::TCppType_t int_like_type (interop::TCppType_t type)
 
static bool is_basic_string_of (const std::string &n, const char *charT)
 
static bool is_identifier (std::string_view s)
 
int LoadCppInterOp ()
 
static void release_args (Parameter *args, size_t nargs)
 
static void remove_deleted_methods (std::vector< interop::TCppMethod_t > &methods)
 
bool split_comma_saparated_types (const std::string &name, std::vector< std::string > &types)
 
std::string trim (const std::string &line)
 
static std::string type_remap (const std::string &n1, const std::string &n2)
 
static bool WrapperCall (interop::TCppMethod_t method, size_t nargs, void *args_, void *self, void *result)
 

Variables

static std::set< std::string > g_builtins
 
static bool gEnableFastPath = true
 
static std::set< std::string > gSmartPtrTypes
 
RInterOpMutex InterOpMutex
 

Macro Definition Documentation

◆ _CRT_SECURE_NO_WARNINGS

#define _CRT_SECURE_NO_WARNINGS

Definition at line 4 of file interop_wrapper.cxx.

◆ _IMP_CALL_PRINT_STMT

#define _IMP_CALL_PRINT_STMT ( type)

Definition at line 1129 of file interop_wrapper.cxx.

◆ CPPJIT_IMP_CALL

#define CPPJIT_IMP_CALL ( typecode,
rtype )
Value:
rtype interop::Call##typecode(TCppMethod_t method, TCppObject_t self, \
size_t nargs, void* args) { \
_IMP_CALL_PRINT_STMT(rtype) \
return CallT<rtype>(method, self, nargs, args); \
}

Definition at line 1132 of file interop_wrapper.cxx.

Typedef Documentation

◆ Parameter

Definition at line 22 of file interop_wrapper.cxx.

Function Documentation

◆ CALL_NARGS()

static size_t CALL_NARGS ( size_t nargs)
inlinestatic

Definition at line 24 of file interop_wrapper.cxx.

◆ CallT()

template<typename T >
static T CallT ( interop::TCppMethod_t method,
interop::TCppObject_t self,
size_t nargs,
void * args )
inlinestatic

Definition at line 1117 of file interop_wrapper.cxx.

◆ copy_args()

static bool copy_args ( Parameter * args,
size_t nargs,
void ** vargs )
inlinestatic

Definition at line 1054 of file interop_wrapper.cxx.

◆ cppstring_to_cstring()

static char * cppstring_to_cstring ( const std::string & cppstr)
inlinestatic

Definition at line 286 of file interop_wrapper.cxx.

◆ cppyy_normalize_name()

static std::string cppyy_normalize_name ( std::string name)
static

Definition at line 1289 of file interop_wrapper.cxx.

◆ destructor_callable()

static Cpp::JitCall destructor_callable ( interop::TCppScope_t scope)
static

Definition at line 1044 of file interop_wrapper.cxx.

◆ GetEnumFromCompleteName()

interop::TCppScope_t GetEnumFromCompleteName ( const std::string & name)

Definition at line 487 of file interop_wrapper.cxx.

◆ int_like_type()

Definition at line 351 of file interop_wrapper.cxx.

◆ is_basic_string_of()

static bool is_basic_string_of ( const std::string & n,
const char * charT )
inlinestatic

Definition at line 1792 of file interop_wrapper.cxx.

◆ is_identifier()

static bool is_identifier ( std::string_view s)
static

Definition at line 499 of file interop_wrapper.cxx.

◆ LoadCppInterOp()

int LoadCppInterOp ( )
extern

Definition at line 266 of file interop_wrapper.cxx.

◆ release_args()

static void release_args ( Parameter * args,
size_t nargs )
inlinestatic

Definition at line 1074 of file interop_wrapper.cxx.

◆ remove_deleted_methods()

static void remove_deleted_methods ( std::vector< interop::TCppMethod_t > & methods)
static

Definition at line 1475 of file interop_wrapper.cxx.

◆ split_comma_saparated_types()

bool split_comma_saparated_types ( const std::string & name,
std::vector< std::string > & types )

Definition at line 454 of file interop_wrapper.cxx.

◆ trim()

std::string trim ( const std::string & line)

Definition at line 444 of file interop_wrapper.cxx.

◆ type_remap()

static std::string type_remap ( const std::string & n1,
const std::string & n2 )
inlinestatic

Definition at line 1805 of file interop_wrapper.cxx.

◆ WrapperCall()

static bool WrapperCall ( interop::TCppMethod_t method,
size_t nargs,
void * args_,
void * self,
void * result )
inlinestatic

Definition at line 1081 of file interop_wrapper.cxx.

Variable Documentation

◆ g_builtins

std::set<std::string> g_builtins
static
Initial value:
= {"bool",
"char",
"signed char",
"unsigned char",
"wchar_t",
"short",
"unsigned short",
"int",
"unsigned int",
"long",
"unsigned long",
"long long",
"unsigned long long",
"float",
"double",
"long double",
"void"}

Definition at line 84 of file interop_wrapper.cxx.

◆ gEnableFastPath

bool gEnableFastPath = true
static

Definition at line 103 of file interop_wrapper.cxx.

◆ gSmartPtrTypes

std::set<std::string> gSmartPtrTypes
static
Initial value:
= {
"std::auto_ptr", "std::shared_ptr", "std::unique_ptr", "std::weak_ptr"}

Definition at line 1386 of file interop_wrapper.cxx.

◆ InterOpMutex

RInterOpMutex InterOpMutex

Definition at line 81 of file interop_wrapper.cxx.