ROOT
v6-24
Reference Guide
Loading...
Searching...
No Matches
PyResult.h
Go to the documentation of this file.
1
#ifndef CPYCPPYY_PYRESULT_H
2
#define CPYCPPYY_PYRESULT_H
3
4
//////////////////////////////////////////////////////////////////////////////
5
// //
6
// TPyResult //
7
// //
8
// Morphing return type from evaluating python expressions. //
9
// //
10
//////////////////////////////////////////////////////////////////////////////
11
12
// Python
13
struct
_object;
14
typedef
_object
PyObject
;
15
16
// Bindings
17
#include "
CPyCppyy/CommonDefs.h
"
18
19
20
namespace
CPyCppyy
{
21
22
class
CPYCPPYY_CLASS_EXTERN
PyResult
{
23
public
:
24
PyResult
();
25
PyResult
(
PyObject
* pyobject);
26
PyResult
(
const
PyResult
&);
27
PyResult
&
operator=
(
const
PyResult
&);
28
virtual
~PyResult
();
29
30
// conversions to standard types, may fail if unconvertible
31
operator
char
*()
const
;
32
operator
const
char
*()
const
;
33
operator
char()
const
;
34
35
operator
long
()
const
;
36
operator
int
()
const
{
return
(
int
)
operator
long
(); }
37
operator
short
()
const
{
return
(
short
)
operator
long
(); }
38
39
operator
unsigned
long
()
const
;
40
operator
unsigned
int
()
const
{
41
return
(
unsigned
int
)
operator
unsigned
long
();
42
}
43
operator
unsigned
short
()
const
{
44
return
(
unsigned
short
)
operator
unsigned
long
();
45
}
46
47
operator
double
()
const
;
48
operator
float()
const
{
return
(
float
)
operator
double
(); }
49
50
// used for both general object type and PyObject conversions
51
operator
void
*()
const
;
52
53
template
<
class
T>
54
operator
T*()
const
{
return
(T*)(
void
*)*
this
; }
55
56
// used strictly for PyObject conversions
57
operator
PyObject
*()
const
;
58
59
private
:
60
PyObject
*
fPyObject
;
//! actual python object
61
};
62
63
}
// namespace CPyCppyy
64
65
#endif
// !CPYCPPYY_PYRESULT_H
double
double
Definition
Converters.cxx:921
short
l unsigned short
Definition
Converters.cxx:862
long
long
Definition
Converters.cxx:858
PyObject
_object PyObject
Definition
PyMethodBase.h:43
PyObject
_object PyObject
Definition
PyResult.h:14
operator=
Binding & operator=(OUT(*fun)(void))
Definition
TRInterface_Binding.h:15
CommonDefs.h
CPYCPPYY_CLASS_EXTERN
#define CPYCPPYY_CLASS_EXTERN
Definition
CommonDefs.h:29
CPyCppyy::PyResult
Definition
PyResult.h:22
CPyCppyy::PyResult::fPyObject
PyObject * fPyObject
Definition
PyResult.h:60
int
CPyCppyy
Set of helper functions that are invoked from the pythonizors, on the Python side.
Definition
TPyClassGenerator.cxx:31
bindings
pyroot
cppyy
CPyCppyy
inc
CPyCppyy
PyResult.h
ROOT v6-24 - Reference Guide Generated on Tue Aug 22 2023 03:06:11 (GVA Time) using Doxygen 1.9.8