Ticket #2776: test.cxx

File test.cxx, 1.2 KB (added by Alexander Kogan <alexander@…>, 14 years ago)
Line 
1// This file has been generated by Py++.
2
3#include "boost/python.hpp"
4
5#include "test.hxx"
6
7namespace bp = boost::python;
8
9struct Vasq_wrapper : Vasq, bp::wrapper< Vasq > {
10
11 virtual void vasq( ) {
12 if( bp::override func_vasq = this->get_override( "vasq" ) )
13 func_vasq( );
14 else
15 this->Vasq::vasq( );
16 }
17
18
19 void default_vasq( ) {
20 Vasq::vasq( );
21 }
22
23};
24
25struct Petq_wrapper : Petq, bp::wrapper< Petq > {
26
27 virtual void vasq( ) {
28 if( bp::override func_vasq = this->get_override( "vasq" ) )
29 func_vasq( );
30 else
31 this->Vasq::vasq( );
32 }
33
34
35 void default_vasq( ) {
36 Vasq::vasq( );
37 }
38
39};
40
41BOOST_PYTHON_MODULE(test){
42 bp::class_< Vasq_wrapper, boost::noncopyable >( "Vasq", bp::no_init )
43 .def(
44 "vasq"
45 , (void ( ::Vasq::* )( ) )(&::Vasq::vasq)
46 , (void ( Vasq_wrapper::* )( ) )(&Vasq_wrapper::default_vasq) );
47
48 bp::class_< Petq_wrapper, bp::bases< Vasq >, boost::noncopyable >( "Petq", bp::no_init )
49 .def(
50 "vasq"
51 , (void ( ::Vasq::* )( ) )(&::Vasq::vasq)
52 , (void ( Petq_wrapper::* )( ) )(&Petq_wrapper::default_vasq) );
53}