Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
unit_exports.h
Go to the documentation of this file.
1 #include "python_class.h"
2 
3 #include "cmd/container.h"
4 #include <string>
5 #include "init.h"
6 #include "gfx/vec.h"
7 #include "cmd/unit_generic.h"
8 #include <boost/version.hpp>
9 #if BOOST_VERSION != 102800
10 #include <boost/python.hpp>
11 typedef boost::python::dict BoostPythonDictionary;
12 #else
13 #include <boost/python/objects.hpp>
14 typedef boost::python::dictionary BoostPythonDictionary;
15 #endif
16 #include "universe_util.h"
17 #include "cmd/unit_util.h"
18 #include "faction_generic.h"
19 #include "cmd/ai/fire.h"
20 
21 #include "unit_wrapper_class.h"
22 #include "unit_from_to_python.h"
23 //void ExportUnit (boost::python::class_builder <UnitWrapper> &Class) {
24 //ExportUnit1(Class);
25 //ExportUnit2(Class);
26 //ExportUnit3(Class);
27 //}
28 
29 void EXP_UN( boost::python::class_builder< UnitWrapper > &Class )
30 {
31 #undef CHECKME
32 #undef WRAPPED0
33 #undef WRAPPED1
34 #undef WRAPPED2
35 #undef WRAPPED3
36 #undef WRAPPED4
37 #undef voidWRAPPED0
38 #undef voidWRAPPED1
39 #undef voidWRAPPED2
40 #undef voidWRAPPED3
41 #undef voidWRAPPED5
42 #undef EXPORT_UTIL0
43 #undef EXPORT_UTIL1
44 #undef EXPORT_UTIL2
45 #undef EXPORT_UTIL3
46 #undef EXPORT_UTIL5
47 #undef voidEXPORT_UTIL0
48 #undef voidEXPORT_UTIL1
49 #undef voidEXPORT_UTIL2
50 #undef voidEXPORT_UTIL3
51 #undef voidEXPORT_UTIL5
52 #define WRAPPED0( type, name, nada ) PYTHON_DEFINE_METHOD( Class, &UnitWrapper::name, #name );
53 #define WRAPPED1( type, name, atype, a, def ) WRAPPED0( type, name, def )
54 #define WRAPPED2( type, name, atype, a, btype, b, def ) WRAPPED0( type, name, def )
55 #define WRAPPED3( type, name, atype, a, btype, b, ctype, c, def ) WRAPPED0( type, name, def )
56 #define WRAPPED4( type, name, atype, a, btype, b, ctype, c, dtype, d, def ) WRAPPED0( type, name, def )
57 #define voidWRAPPED0( name ) WRAPPED0( void, name, 0 )
58 #define voidWRAPPED1( name, atype, a ) WRAPPED0( void, name, 0 )
59 #define voidWRAPPED2( name, atype, a, btype, b ) WRAPPED0( void, name, 0 )
60 #define voidWRAPPED3( name, atype, a, btype, b, ctype, c ) WRAPPED0( void, name, 0 )
61 #define voidWRAPPED5( name, atype, a, btype, b, ctype, c, dtype, d, etype, e ) WRAPPED0( void, name, 0 )
62 #define EXPORT_UTIL0( type, name ) WRAPPED0( type, name, 0 )
63 #define EXPORT_UTIL1( type, name, atype, a ) WRAPPED0( type, name, 0 )
64 #define EXPORT_UTIL2( type, name, atype, a, btype, b ) WRAPPED0( type, name, 0 )
65 #define EXPORT_UTIL3( type, name, atype, a, btype, b, ctype, c ) WRAPPED0( type, name, 0 )
66 #define EXPORT_UTIL5( type, name, atype, a, btype, b, ctype, c, dtype, d, etype, e ) WRAPPED0( type, name, 0 )
67 #define voidEXPORT_UTIL0( name ) WRAPPED0( void, name, 0 )
68 #define voidEXPORT_UTIL1( name, atype, a ) WRAPPED0( void, name, 0 )
69 #define voidEXPORT_UTIL2( name, atype, a, btype, b ) WRAPPED0( void, name, 0 )
70 #define voidEXPORT_UTIL3( name, atype, a, btype, b, ctype, c ) WRAPPED0( void, name, 0 )
71 #define voidEXPORT_UTIL5( name, atype, a, btype, b, ctype, c, dtype, d, etype, e ) WRAPPED0( void, name, 0 )
72 #include "python_unit_wrap.h"
73 #undef WRAPPED0
74 #undef WRAPPED1
75 #undef WRAPPED2
76 #undef WRAPPED3
77 #undef voidWRAPPED0
78 #undef voidWRAPPED1
79 #undef voidWRAPPED2
80 #undef voidWRAPPED3
81 #undef voidWRAPPED5
82 #undef EXPORT_UTIL0
83 #undef EXPORT_UTIL1
84 #undef EXPORT_UTIL2
85 #undef EXPORT_UTIL3
86 #undef EXPORT_UTIL5
87 #undef voidEXPORT_UTIL0
88 #undef voidEXPORT_UTIL1
89 #undef voidEXPORT_UTIL2
90 #undef voidEXPORT_UTIL3
91 }
92