annotate engine/swigwrappers/python/fife.i.templ @ 638:980c02db2f56

* Fixed a swig template that got missed in a previous commit
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 07 Oct 2010 16:15:09 +0000
parents a7909cdcdc85
children b9c132cb6ea4
rev   line source
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
1 %module(directors="1") fife
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
2 %include "std_string.i"
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
3 %include "std_vector.i"
112
98541d3b9220 * add some std types to swig wrapper (fife.i.templ)
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
4 %include "std_pair.i"
98541d3b9220 * add some std types to swig wrapper (fife.i.templ)
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
5 %include "std_list.i"
98541d3b9220 * add some std types to swig wrapper (fife.i.templ)
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
6 %include "std_map.i"
98541d3b9220 * add some std types to swig wrapper (fife.i.templ)
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
7 %include "std_set.i"
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
8 %include "typemaps.i"
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
9 %include "exception.i"
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
10
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
11 /**
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
12 * Some materials to understand exception handling:
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
13 *
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
14 * Basics about python exceptions:
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
15 * http://docs.python.org/tut/node10.html
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
16 * Python exception handling in C APIs
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
17 * http://docs.python.org/api/exceptions.html
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
18 * http://docs.python.org/api/exceptionHandling.html
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
19 * SWIG exception handling
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
20 * http://www.swig.org/Doc1.3/Customization.html#exception
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
21 * http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_exception_specifications
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
22 * http://www.swig.org/Doc1.3/Python.html#Python_nn36
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
23 */
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
24
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
25 %feature("autodoc", "1"); // 0 == no param types, 1 == show param types
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
26
632
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
27 /**
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
28 * Integer definitions (See swigs stdint.i implementation)
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
29 *
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
30 */
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
31
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
32 /* Signed. */
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
33 typedef signed char int8_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
34 typedef short int int16_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
35 typedef int int32_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
36 #if defined(SWIGWORDSIZE64)
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
37 typedef long int int64_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
38 #else
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
39 typedef long long int int64_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
40 #endif
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
41
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
42 /* Unsigned. */
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
43 typedef unsigned char uint8_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
44 typedef unsigned short int uint16_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
45 typedef unsigned int uint32_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
46 #if defined(SWIGWORDSIZE64)
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
47 typedef unsigned long int uint64_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
48 #else
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
49 typedef unsigned long long int uint64_t;
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
50 #endif
a7909cdcdc85 * A little data type cleanup in the FIFE::EngineSettings class
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 167
diff changeset
51
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
52 namespace std {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
53 %template(StringVector) vector<std::string>;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
54 %template(UintVector) vector<unsigned int>;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
55 %template(IntVector) vector<int>;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
56 %template(FloatVector) vector<float>;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
57 %template(DoubleVector) vector<double>;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
58 %template(BoolVector) vector<bool>;
112
98541d3b9220 * add some std types to swig wrapper (fife.i.templ)
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
59
638
980c02db2f56 * Fixed a swig template that got missed in a previous commit
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 632
diff changeset
60 %template(Uint16Uint16Pair) pair<uint16_t, uint16_t>;
980c02db2f56 * Fixed a swig template that got missed in a previous commit
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 632
diff changeset
61 %template(Uint16Uint16PairVector) vector<std::pair<uint16_t, uint16_t> >;
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
62 };
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
63
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
64 %{
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
65 #include "util/base/exception.h"
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
66 static void handleDirectorException() {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
67 PyObject* exception = NULL;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
68 PyObject* value = NULL;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
69 PyObject* traceback = NULL;
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
70 PyErr_Fetch(&exception, &value, &traceback);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
71 PyErr_NormalizeException(&exception, &value, &traceback);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
72 if (exception) {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
73 PySys_SetObject("last_type", exception);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
74 PySys_SetObject("last_value", value);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
75 PySys_SetObject("last_traceback", traceback);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
76
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
77 PyObject* d = PyModule_GetDict (PyImport_AddModule ("__main__"));
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
78 PyDict_SetItemString(d, "exc_type", exception);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
79 PyDict_SetItemString(d, "exc_value", value);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
80 PyDict_SetItemString(d, "exc_traceback", traceback ? traceback : Py_None);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
81
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
82 char buf[1024];
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
83 sprintf (buf, "\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
84 import traceback\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
85 s = \"\"\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
86 for filename, line, function, text in traceback.extract_tb(exc_traceback):\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
87 s = s + ' File \"%%s\", line %%d, in %%s\\n %%s' %% (filename, line, function, text)\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
88 if s[-1] != '\\n': s = s + '\\n'\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
89 for l in traceback.format_exception_only(exc_type, exc_value):\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
90 s = s + ' ' + l\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
91 if s[-1] != '\\n': s = s + '\\n'\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
92 print s\n\
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
93 ");
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
94 PyObject* e = PyRun_String(buf, Py_file_input, d, d);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
95 if (!e) {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
96 PyErr_Print();
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
97 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
98 Py_XDECREF(e);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
99 Py_XDECREF(d);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
100 Py_XDECREF(exception);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
101 Py_XDECREF(value);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
102 Py_XDECREF(traceback);
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
103 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
104 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
105
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
106 #define _FIFE_EXC_HANDLER(_fife_exc_type, _converted_type) \
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
107 catch (FIFE::_fife_exc_type& _e) { \
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
108 PyErr_Clear(); \
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
109 SWIG_exception(_converted_type, _e.getMessage().c_str()); \
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
110 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
111
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
112 #define _FIFE_DIRECTOR_EXC_HANDLER() \
167
10a5f9e6c03f * Fixed a few thousand warnings made by swigwrapper in MSVC.
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 112
diff changeset
113 catch (Swig::DirectorException &) { \
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
114 PyErr_Clear(); \
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
115 SWIG_exception(SWIG_RuntimeError, "Catched director exception"); \
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
116 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
117 %}
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
118
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
119 %feature("director:except") {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
120 if ($$error != NULL) {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
121 handleDirectorException();
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
122 throw Swig::DirectorMethodException();
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
123 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
124 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
125
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
126 %exception {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
127 try {
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
128 $$action
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
129 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
130 _FIFE_DIRECTOR_EXC_HANDLER()
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
131 _FIFE_EXC_HANDLER(Exception, SWIG_RuntimeError)
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
132 }
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
133
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
134 $inclusions
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
135
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
136 %include engine/swigwrappers/python/extensions.i.templ