Changeset 95
- Timestamp:
- 11/12/04 13:37:20 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/python_SD.cc
r83 r95 33 33 #include <boost/python.hpp> 34 34 #include <boost/python/pyconversions.h> 35 #include <boost/python/exception_translator.hpp> 36 #include <casa/Exceptions.h> 35 37 36 38 #include "python_SD.h" 37 39 40 namespace asap { 41 namespace python { 42 void translate_ex(AipsError const& e) 43 { 44 // Use the Python 'C' API to set up an exception object 45 PyErr_SetString(PyExc_RuntimeError, e.what()); 46 } 47 48 } 49 } 38 50 using namespace boost::python; 39 51 40 BOOST_PYTHON_MODULE( asap) {52 BOOST_PYTHON_MODULE(_asap) { 41 53 asap::python::python_SDMemTable(); 42 54 asap::python::python_SDReader(); 43 55 asap::python::python_SDWriter(); 44 56 asap::python::python_SDMath(); 57 asap::python::python_SDFitter(); 58 59 register_exception_translator<AipsError>(&asap::python::translate_ex); 45 60 46 61 std_vector_to_tuple < int > (); 47 from_python_sequence < std::vector < int >, 62 from_python_sequence < std::vector < int >, 48 63 variable_capacity_policy > (); 49 64 std_vector_to_tuple < float > (); 50 from_python_sequence < std::vector < float >, 65 from_python_sequence < std::vector < float >, 51 66 variable_capacity_policy > (); 52 67 std_vector_to_tuple < double > (); 53 from_python_sequence < std::vector < double >, 68 from_python_sequence < std::vector < double >, 54 69 variable_capacity_policy > (); 55 70 std_vector_to_tuple < std::string > (); 56 from_python_sequence < std::vector < std::string >, 71 from_python_sequence < std::vector < std::string >, 57 72 variable_capacity_policy > (); 58 73 std_vector_to_tuple < bool> (); 59 from_python_sequence < std::vector < bool >, 74 from_python_sequence < std::vector < bool >, 60 75 variable_capacity_policy > (); 61 76 }
Note:
See TracChangeset
for help on using the changeset viewer.