Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Executors.h
Go to the documentation of this file.
1#ifndef CPYRT_EXECUTORS_H
2#define CPYRT_EXECUTORS_H
3
4#include "Python.h"
5#include "cppjit_interop.h"
6
7// Bindings
8#include "Dimensions.h"
9
10// Standard
11#include <string>
12
13namespace cppjit::cpyrt {
14
15struct CallContext;
16
17class CPYRT_CLASS_EXPORT Executor {
18public:
19 virtual ~Executor();
21 CallContext*) = 0;
22 virtual bool HasState() { return false; }
23};
24
25// special case needed for CPPSetItem
26class RefExecutor : public Executor {
27public:
28 RefExecutor() : fAssignable(nullptr) {}
29 virtual bool SetAssignable(PyObject*);
30 bool HasState() override { return true; }
31
32protected:
34};
35
36// create/destroy executor from fully qualified type (public API)
37CPYRT_EXPORT Executor* CreateExecutor(const std::string& fullType, cdims_t = 0);
40typedef Executor* (*ef_t)(cdims_t);
41CPYRT_EXPORT bool RegisterExecutor(const std::string& name, ef_t fac);
42CPYRT_EXPORT bool RegisterExecutorAlias(const std::string& name,
43 const std::string& target);
44CPYRT_EXPORT bool UnregisterExecutor(const std::string& name);
45
46// helper for the actual call
49
50} // namespace cppjit::cpyrt
51
52#endif // !CPYRT_EXECUTORS_H
_object PyObject
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char name[80]
Definition TGX11.cxx:142
#define CPYRT_CLASS_EXPORT
Definition CommonDefs.h:27
#define CPYRT_EXPORT
Definition CommonDefs.h:25
virtual PyObject * Execute(interop::TCppMethod_t, interop::TCppObject_t, CallContext *)=0
virtual bool HasState()
Definition Executors.h:22
virtual bool SetAssignable(PyObject *)
bool HasState() override
Definition Executors.h:30
CPYRT_EXTERN bool RegisterExecutorAlias(const std::string &name, const std::string &target)
CPYRT_EXTERN Executor * CreateExecutor(const std::string &name, cdims_t=0)
CPYRT_EXPORT void DestroyExecutor(Executor *p)
CPYRT_EXTERN bool UnregisterExecutor(const std::string &name)
const dims_t & cdims_t
Definition API.h:114
Executor *(* ef_t)(cdims_t)
Definition Executors.h:40
CPYRT_EXTERN void * CallVoidP(interop::TCppMethod_t, interop::TCppObject_t, CallContext *)
CPYRT_EXTERN bool RegisterExecutor(const std::string &name, ExecutorFactory_t)
Cpp::TypeRef TCppType_t
Definition API.h:42
Cpp::ObjectRef TCppObject_t
Definition API.h:43
Cpp::FuncRef TCppMethod_t
Definition API.h:44