1 // (C) Copyright 2006 Douglas Gregor <doug.gregor -at- gmail.com>
2
3 // Use, modification and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6
7 // Authors: Douglas Gregor
8
9 /** @file status.cpp
10 *
11 * This file reflects the Boost.MPI @c status class into
12 * Python.
13 */
14 #include <boost/python.hpp>
15 #include <boost/mpi.hpp>
16
17 using namespace boost::python;
18 using namespace boost::mpi;
19
20 namespace boost { namespace mpi { namespace python {
21
22 extern const char* status_docstring;
23 extern const char* status_source_docstring;
24 extern const char* status_tag_docstring;
25 extern const char* status_error_docstring;
26 extern const char* status_cancelled_docstring;
27
export_status()28 void export_status()
29 {
30 using boost::python::arg;
31 using boost::python::object;
32
33 class_<status>("Status", status_docstring, no_init)
34 .add_property("source", &status::source, status_source_docstring)
35 .add_property("tag", &status::tag, status_tag_docstring)
36 .add_property("error", &status::error, status_error_docstring)
37 .add_property("cancelled", &status::cancelled, status_cancelled_docstring)
38 ;
39 }
40
41 } } } // end namespace boost::mpi::python
42