Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
Executors.h
Go to the documentation of this file.
1#ifndef CPYCPPYY_EXECUTORS_H
2#define CPYCPPYY_EXECUTORS_H
3
4// Bindings
5#include "Dimensions.h"
6
7// Standard
8#include <string>
9
10
11namespace CPyCppyy {
12
13struct CallContext;
14
15class CPYCPPYY_CLASS_EXPORT Executor {
16public:
17 virtual ~Executor();
18 virtual PyObject* Execute(
20 virtual bool HasState() { return false; }
21};
22
23// special case needed for CPPSetItem
24class RefExecutor : public Executor {
25public:
26 RefExecutor() : fAssignable(nullptr) {}
27 virtual bool SetAssignable(PyObject*);
28 virtual bool HasState() { return true; }
29
30protected:
32};
33
34// create/destroy executor from fully qualified type (public API)
35CPYCPPYY_EXPORT Executor* CreateExecutor(const std::string& fullType, cdims_t = 0);
37typedef Executor* (*ef_t) (cdims_t);
38CPYCPPYY_EXPORT bool RegisterExecutor(const std::string& name, ef_t fac);
39CPYCPPYY_EXPORT bool RegisterExecutorAlias(const std::string& name, const std::string& target);
40CPYCPPYY_EXPORT bool UnregisterExecutor(const std::string& name);
41
42// helper for the actual call
44
45} // namespace CPyCppyy
46
47#endif // !CPYCPPYY_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
char name[80]
Definition TGX11.cxx:110
#define CPYCPPYY_CLASS_EXPORT
Definition CommonDefs.h:27
#define CPYCPPYY_EXPORT
Definition CommonDefs.h:25
virtual PyObject * Execute(Cppyy::TCppMethod_t, Cppyy::TCppObject_t, CallContext *)=0
virtual bool HasState()
Definition Executors.h:20
virtual bool SetAssignable(PyObject *)
PyObject * fAssignable
Definition Executors.h:31
virtual bool HasState()
Definition Executors.h:28
CPYCPPYY_EXTERN bool UnregisterExecutor(const std::string &name)
CPYCPPYY_EXTERN bool RegisterExecutorAlias(const std::string &name, const std::string &target)
CPYCPPYY_EXPORT void DestroyExecutor(Executor *p)
CPYCPPYY_EXTERN bool RegisterExecutor(const std::string &name, ExecutorFactory_t)
CPYCPPYY_EXTERN Executor * CreateExecutor(const std::string &name, cdims_t=0)
const dims_t & cdims_t
Definition API.h:104
Executor *(* ef_t)(cdims_t)
Definition Executors.h:37
CPYCPPYY_EXTERN void * CallVoidP(Cppyy::TCppMethod_t, Cppyy::TCppObject_t, CallContext *)
intptr_t TCppMethod_t
Definition cpp_cppyy.h:22
void * TCppObject_t
Definition cpp_cppyy.h:21