exportToPython.cxx
Go to the documentation of this file.
1 
12 #ifdef HAVE_CONFIG_H
13 //for have qt app
14 #include "config.h"
15 #endif
16 
17 #ifdef _MSC_VER
18 # pragma warning(disable:4231) // nonstandard extension used 'extern'
19  // before...
20 # pragma warning(disable:4251) // needs to have dll-interface used by client
21 # pragma warning(disable:4275) // non dll-interface struct
22 # pragma warning(disable:4800) // 'int' : forcing value to bool
23  // 'true' or 'false' (performance
24  // warning)
25 #endif
26 
27 #include "exportToPython.h"
28 
29 // include first to avoid _POSIX_C_SOURCE redefined warnings
30 #include "pyconversions.h"
31 
32 #include "QtCut.h"
33 #include "PyDataRep.h"
34 #include "PyDataSource.h"
35 
36 
37 using std::vector;
38 using namespace hippodraw::Python;
39 using namespace boost::python;
40 
41 namespace hippodraw {
42  namespace Python {
43 
44 #if __GNUC__ < 3
45 
52  void
53  translate ( const std::exception & e )
54  {
55  PyErr_SetString ( PyExc_RuntimeError, e.what() );
56  }
57 #endif
58 
59 void
61 {
62 #if __GNUC__ < 3
63  register_exception_translator < std::exception > ( & translate );
64 #endif
65 
66  /* The following is neede for PyGILState_Ensure / _Release to
67  work. */
68  PyEval_InitThreads();
69 
70  // The order is important. Base class before derived classes
71 
72 #ifdef HAVE_QT_APP
74 #endif
77  export_ListTuple (); // derived from DataSource
78 #ifdef HAVE_NUMARRAY
79  export_NumArrayTuple (); // derived from DataSource
80 #endif
81 #ifdef HAVE_ROOT
82  export_RootNTuple (); // derived from DataSource
84 #endif
86 #ifdef HAVE_CFITSIO
88  export_FitsNTuple (); // derived from DataSource
89 #endif
90  export_NTuple (); // derived from DataSource
91  export_PyNTuple (); // derived from NTuple
92  export_CircularBuffer (); // derived from NTuple
94  export_Observer ();
96  export_QtCut (); // derived from QtDisplay
97  export_Function ();
98 #ifdef HAVE_QT_APP
99  export_Canvas ();
100 #endif
101  export_HDApp ();
102  export_DataRep ();
103  export_RepBase ();
106  export_Fitter ();
108  // order is important, base class first
109  export_FCNBase ();
110  export_StatedFCN ();
111  export_NTupleFCN ();
112 #ifndef BOOST_DEFECT
114 #endif
117  export_LineStyle ();
118  export_Color ();
119 
125 
128 
131 
134 
137 
140 
143 
144 }
145 
146 } // end namespace Python
147 } // end namespace hippodraw
void export_RepBase()
Exports the RepBase class to Python.
void export_QtCut()
Exports the QtCut class to Python.
void export_Fitter()
Exports the Fitter class to Python.
void export_FitsNTuple()
Exports the FitsNTuple.
void export_ListTuple()
Exports the ListTuple class to Python.
void export_HDApp()
Exports the PyApp class to Python.
Definition: PyApp.cxx:51
void export_QtDisplay()
Exports the QtDisplay class to Python.
Definition: QtDisplay.cxx:73
void export_SymbolType()
Export hippodraw::Symbo::lType enum.
hippodraw::QtCut class interface
void export_FunctionBase()
Export the FunctionBase and its FunctionWrap.
hippodraw::PyDataRep class interface
Converts an STL vector of T objects to Python tuple.
Definition: pyconversions.h:69
void export_DataRep()
Exports the PyDataRep class to Python.
Definition: PyDataRep.cxx:47
void exportToPython()
Exports HippoDraw C++ classes to Python.
void export_FunctionFactory()
Exports the FitterFactory.
void export_Function()
Exports the PyFunctionRep class to Python.
void export_DataArray()
Export PyDataSourceWrapper.
void export_PyNTuple()
Exports the PyNTuple class to Python.
void export_Observer()
Exports the Observer class to Python.
void export_PointRepFactory()
Exports the PointRepFactory class to Python.
void export_NTupleFCN()
Exports the base class of data source objective functions.
void export_FitterFactory()
Exports the FitterFactory.
hippodraw::PyDataSource class interface
Conversion of Python sequence to C++ container.
void export_LineStyle()
Export hippodraw::LineStyle enumeration.
void export_RootController()
Exports the RootController.
void translate(const std::exception &e)
Translate a C++ exception to a Python one.
void export_RootNTuple()
Exports the RootNTuple.
Declaration of functions exporting HippoDraw classes to Python with Boost.Python. ...
void export_NTuple()
Exports the NTuple class to Python.
void export_DataSource()
Exports the DataSource class to Python.
void export_CutController()
Exports CutContoller class to Python.
void export_CanvasWindow()
Exports the CanvasWindow class to Python.
Operations on containers that have variable capacity for conversion from Python container to C++ one...
Boost.Python conversion functions from STL containers to Python sequences and vice versa...
void export_Color()
Exports to Python the Color class and its enumerations.
void export_Factory_PointRep()
Exports the template base class of PointRepFactory.
void export_Canvas()
Exports the PyCanvas class to Python.
void export_NTupleController()
Exports the NTupleController class to Python.
void export_NumArrayTuple()
Exports the NumArrayTuple class to Python.
void export_FitsController()
Exports the FitsController.
void export_CircularBuffer()
Exports the CircularBuffer class to Python.
void export_FCNBase()
Export the base class of objective functions.
void export_StatedFCN()
Export the base class of stated objective functions.

Generated for HippoDraw Class Library by doxygen