library: libPyROOT
#include "TPyReturn.h"

TPyReturn


class description - header file - source file - inheritance tree (.pdf)

class TPyReturn

Inheritance Chart:
TPyReturn

    public:
TPyReturn() TPyReturn(PyObject* pyobject) TPyReturn(const TPyReturn&) virtual ~TPyReturn() static TClass* Class() virtual TClass* IsA() const Char_t operator Char_t() const char* operator const char*() const Double_t operator Double_t() const Float_t operator Float_t() const Int_t operator Int_t() const Long_t operator Long_t() const Short_t operator Short_t() const UInt_t operator UInt_t() const ULong_t operator ULong_t() const UShort_t operator UShort_t() const void* operator void*() const TPyReturn& operator=(const TPyReturn&) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
PyObject* fPyObject ! actual python object

Class Description

______________________________________________________________________________
                        Python expression eval result
                        =============================

 Transport class for bringing objects from python (dynamically typed) to CINT
 (statically typed). It is best to immediately cast a TPyReturn to the real
 type, either implicitly (for builtin types) or explicitly (through a void*
 cast for pointers to ROOT objects).

 Examples:

  root [0] TBrowser* b = (void*)TPython::Eval( "ROOT.TBrowser()" );
  root [1] int i = TPython::Eval( "1+1" );
  root [2] i
  (int)2
  root [3] double d = TPython::Eval( "1+3.1415" );
  root [4] d
  (double)4.14150000000000063e+00
TPyReturn()
 Construct a TPyReturn object from Py_None.
TPyReturn( PyObject* pyobject )
 Construct a TPyReturn from a python object. The python object may represent
 a ROOT object. Steals reference to given python object.
TPyReturn( const TPyReturn& other )
 Copy constructor. Applies python object reference counting.
TPyReturn& operator=( const TPyReturn& other )
 Assignment operator. Applies python object reference counting.
~TPyReturn()
 Destructor. Reference counting for the held python object is in effect.
operator const char*()
 Cast python return value to C-style string (may fail).
operator Char_t()
 Cast python return value to C++ char (may fail).
operator Long_t()
 Cast python return value to C++ long (may fail).
operator ULong_t()
 Cast python return value to C++ unsigned long (may fail).
operator Double_t()
 Cast python return value to to C++ double (may fail).
operator void*()
 Cast python return value to ROOT object with dictionary (may fail; note that
 you have to use the void* converter, as CINT will not call any other).
operator Int_t()
operator Short_t()
operator UInt_t()
operator UShort_t()
operator Float_t()

Author: Wim Lavrijsen, May 2004
Last update: root/pyroot:$Name: $:$Id: TPyReturn.cxx,v 1.7 2006/07/01 21:19:55 brun Exp $


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.