File indexing completed on 2025-09-16 09:09:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TPyReturn
0013 #define ROOT_TPyReturn
0014
0015
0016 #include "Rtypes.h"
0017
0018
0019 struct _object;
0020 typedef _object PyObject;
0021
0022
0023 class TPyReturn {
0024 public:
0025 TPyReturn();
0026 TPyReturn(PyObject *pyobject);
0027 TPyReturn(const TPyReturn &);
0028 TPyReturn &operator=(const TPyReturn &);
0029 virtual ~TPyReturn();
0030
0031
0032 operator char *() const;
0033 operator const char *() const;
0034 operator Char_t() const;
0035
0036 operator Long_t() const;
0037 operator Int_t() const { return (Int_t) operator Long_t(); }
0038 operator Short_t() const { return (Short_t) operator Long_t(); }
0039
0040 operator ULong_t() const;
0041 operator UInt_t() const { return (UInt_t) operator ULong_t(); }
0042 operator UShort_t() const { return (UShort_t) operator ULong_t(); }
0043
0044 operator Double_t() const;
0045 operator Float_t() const { return (Float_t) operator Double_t(); }
0046
0047
0048 operator void *() const;
0049
0050 template <class T>
0051 operator T *() const
0052 {
0053 return (T *)(void *)*this;
0054 }
0055
0056
0057 operator PyObject *() const;
0058
0059 ClassDef(TPyReturn, 1)
0060
0061 private:
0062 PyObject *fPyObject;
0063 };
0064
0065 #endif