Logo ROOT   6.08/07
Reference Guide
RootWrapper.h
Go to the documentation of this file.
1 // @(#)root/pyroot:$Id$
2 // Author: Wim Lavrijsen, Apr 2004
3 
4 #ifndef PYROOT_ROOTWRAPPER_H
5 #define PYROOT_ROOTWRAPPER_H
6 
7 // ROOT
8 class TGlobal;
9 
10 // Standard
11 #include <string>
12 
13 
14 namespace PyROOT {
15 
16 // initialize ROOT
17  void InitRoot();
18 
19 // construct a Python shadow class for the named C++ class
24  const std::string& scope_name, PyObject* parent = 0 );
25 
26 // convenience function to retrieve global variables and enums
27  PyObject* GetCppGlobal( const std::string& name );
29 
30 // bind a ROOT object into a Python object
32  Bool_t isRef = kFALSE, Bool_t isValue = kFALSE );
34  Cppyy::TCppObject_t object, Cppyy::TCppType_t klass, Bool_t isRef = kFALSE );
36  Cppyy::TCppObject_t object, const std::string& clName, Bool_t isRef = kFALSE )
37  {
38  return BindCppObject( object, Cppyy::GetScope( clName ), isRef );
39  }
40 
43 
44 } // namespace PyROOT
45 
46 #endif // !PYROOT_ROOTWRAPPER_H
TCppScope_t TCppType_t
Definition: Cppyy.h:13
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
PyObject * BindCppObjectArray(Cppyy::TCppObject_t address, Cppyy::TCppType_t klass, Int_t size)
TODO: this function exists for symmetry; need to figure out if it&#39;s useful.
PyObject * GetCppGlobal(const std::string &name)
try named global variable/enum (first ROOT, then Cling: sync is too slow)
PyObject * BindCppGlobal(TGlobal *)
gbl == 0 means global does not exist (rather than gbl is NULL pointer)
void InitRoot()
PyObject * BindCppObjectNoCast(Cppyy::TCppObject_t object, Cppyy::TCppType_t klass, Bool_t isRef=kFALSE, Bool_t isValue=kFALSE)
only known or knowable objects will be bound (null object is ok)
Global variables class (global variables are obtained from CINT).
Definition: TGlobal.h:29
void * TCppObject_t
Definition: Cppyy.h:14
PyObject * CreateScopeProxy(Cppyy::TCppScope_t)
Convenience function with a lookup first through the known existing proxies.
TCppScope_t GetScope(const std::string &scope_name)
Definition: Cppyy.cxx:171
PyObject * GetScopeProxy(Cppyy::TCppScope_t)
Retrieve scope proxy from the known ones.
ptrdiff_t TCppScope_t
Definition: Cppyy.h:12
PyObject * BindCppObject(Cppyy::TCppObject_t object, Cppyy::TCppType_t klass, Bool_t isRef=kFALSE)
if the object is a null pointer, return a typed one (as needed for overloading)
char name[80]
Definition: TGX11.cxx:109
_object PyObject
Definition: TPyArg.h:22