initial release
[pykit.git] / PythonPublisher.hh
1 // $Id$
2 //
3 // Copyright (C) 2010
4 //     Stefan Bund <info@j32.de>
5
6 /** \file
7     \brief PythonPublisher public header */
8
9 #ifndef HH_PyKit_PythonPublisher_
10 #define HH_PyKit_PythonPublisher_ 1
11
12 // Custom includes
13 #include <boost/python.hpp>
14 #include "Publisher.hh"
15
16 //#include "PythonPublisher.mpp"
17 ///////////////////////////////hh.p////////////////////////////////////////
18
19 namespace pykit {
20
21     class PythonPublisher
22         : public Publisher
23     {
24     public:
25         PythonPublisher(std::string initPy);
26
27         void publish(Request & request);
28
29     private:
30         boost::python::dict mainNamespace_;
31         Publisher * pythonPublisher_;
32     };
33
34 #   define PYTHON_PREPARE_IMPORT(module) \
35         PyImport_AppendInittab(const_cast<char*>(#module), init ## module)
36
37 }
38
39 ///////////////////////////////hh.e////////////////////////////////////////
40 //#include "PythonPublisher.cci"
41 //#include "PythonPublisher.ct"
42 //#include "PythonPublisher.cti"
43 #endif
44
45 \f
46 // Local Variables:
47 // mode: c++
48 // fill-column: 100
49 // comment-column: 40
50 // c-file-style: "j32"
51 // indent-tabs-mode: nil
52 // ispell-local-dictionary: "american"
53 // compile-command: "scons -U"
54 // End: