]>
Commit | Line | Data |
---|---|---|
bd3239d2 MF |
1 | typedef long unsigned int size_t; |
2 | namespace std __attribute__ ((__visibility__ ("default"))) { | |
3 | using ::size_t; | |
4 | } | |
5 | class QString { | |
6 | public: inline QString(); | |
7 | inline QString(const char *ch) : d(fromAscii_helper(ch)) { | |
8 | } | |
9 | private: struct Data { | |
10 | }; | |
11 | Data *d; | |
12 | static Data *fromAscii_helper(const char *str, int size = -1); | |
13 | }; | |
14 | class QGenericArgument { | |
15 | }; | |
16 | class QObject { | |
17 | }; | |
18 | class QWebPage : public QObject { | |
19 | public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { | |
20 | } | |
21 | class ExtensionOption { | |
22 | }; | |
23 | }; | |
24 | extern "C" { | |
25 | typedef struct _object { | |
26 | } | |
27 | PyObject; | |
28 | typedef struct { | |
29 | } | |
30 | PyVarObject; | |
31 | typedef struct bufferinfo { | |
32 | } | |
33 | PyTypeObject; | |
34 | typedef struct { | |
35 | } | |
36 | PyListObject; | |
37 | } | |
38 | namespace boost{ | |
39 | __extension__ typedef long long long_long_type; | |
40 | } | |
41 | namespace mpl_ { | |
42 | namespace aux { | |
43 | } | |
44 | } | |
45 | namespace boost { | |
46 | namespace mpl { | |
47 | using namespace mpl_; | |
48 | } | |
49 | } | |
50 | namespace mpl_ { | |
51 | template< bool C_ > struct bool_; | |
52 | typedef bool_<false> false_; | |
53 | template< bool C_ > struct bool_ { | |
54 | static const bool value = C_; | |
55 | }; | |
56 | template< typename T, T N > struct integral_c { | |
57 | static const T value = N; | |
58 | }; | |
59 | } | |
60 | namespace boost{ | |
61 | template <class T, T val> struct integral_constant : public mpl::integral_c<T, val> { | |
62 | }; | |
63 | namespace detail { | |
64 | template <typename T> struct cv_traits_imp { | |
65 | typedef T unqualified_type; | |
66 | }; | |
67 | } | |
68 | template< typename T > struct is_reference : ::boost::integral_constant<bool,false> { | |
69 | }; | |
70 | template< typename T > struct remove_cv { | |
71 | typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type; | |
72 | }; | |
73 | namespace python { | |
74 | namespace detail { | |
75 | typedef char* yes_convertible; | |
76 | typedef int* no_convertible; | |
77 | template <class Target> struct convertible { | |
78 | }; | |
79 | } | |
80 | namespace detail { | |
81 | template <class Source, class Target> inline Target* upcast(Source* p, yes_convertible, no_convertible, Target*) { | |
82 | } | |
83 | } | |
84 | } | |
85 | } | |
86 | extern "C++" { | |
87 | namespace std { | |
88 | class type_info { | |
89 | }; | |
90 | } | |
91 | struct __numeric_limits_base { | |
92 | }; | |
93 | } | |
94 | namespace boost { | |
95 | template< typename T > struct is_integral : ::boost::integral_constant<bool,false> { | |
96 | }; | |
97 | template< typename T > struct is_float : ::boost::integral_constant<bool,false> { | |
98 | }; | |
99 | namespace type_traits { | |
100 | template <bool b1, bool b2, bool b3 = false, bool b4 = false, bool b5 = false, bool b6 = false, bool b7 = false> struct ice_or; | |
101 | template <> struct ice_or<false, false, false, false, false, false, false> { | |
102 | static const bool value = false; | |
103 | }; | |
104 | } | |
105 | namespace detail { | |
106 | template< typename T > struct is_arithmetic_impl { | |
107 | static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral<T>::value, ::boost::is_float<T>::value >::value) ; | |
108 | }; | |
109 | } | |
110 | template< typename T > struct is_arithmetic : ::boost::integral_constant<bool,::boost::detail::is_arithmetic_impl<T>::value> { | |
111 | }; | |
112 | namespace type_traits { | |
113 | template <typename T> struct is_mem_fun_pointer_impl { | |
114 | static const bool value = false; | |
115 | }; | |
116 | } | |
117 | template< typename T > struct is_member_function_pointer : ::boost::integral_constant<bool,::boost::type_traits::is_mem_fun_pointer_impl<typename remove_cv<T>::type>::value> { | |
118 | }; | |
119 | template< typename T > struct is_member_pointer : ::boost::integral_constant<bool,::boost::is_member_function_pointer<T>::value> { | |
120 | }; | |
121 | namespace type_traits { | |
122 | template <bool b1, bool b2, bool b3 = true, bool b4 = true, bool b5 = true, bool b6 = true, bool b7 = true> struct ice_and; | |
123 | template <bool b1, bool b2, bool b3, bool b4, bool b5, bool b6, bool b7> struct ice_and { | |
124 | static const bool value = false; | |
125 | }; | |
126 | template <bool b> struct ice_not { | |
127 | static const bool value = true; | |
128 | }; | |
129 | } | |
130 | namespace detail { | |
131 | template< typename T > struct is_pointer_helper { | |
132 | static const bool value = false; | |
133 | }; | |
134 | template< typename T > struct is_pointer_impl { | |
135 | static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper<typename remove_cv<T>::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer<T>::value >::value >::value) ; | |
136 | }; | |
137 | } | |
138 | template< typename T > struct is_pointer : ::boost::integral_constant<bool,::boost::detail::is_pointer_impl<T>::value> { | |
139 | }; | |
140 | template<typename T> class unwrap_reference { | |
141 | }; | |
142 | struct na { | |
143 | }; | |
144 | } | |
145 | namespace boost { | |
146 | namespace mpl { | |
147 | template< bool C , typename T1 , typename T2 > struct if_c { | |
148 | typedef T2 type; | |
149 | }; | |
150 | template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { | |
151 | private: typedef if_c< static_cast<bool>(T1::value) , T2 , T3 > almost_type_; | |
152 | public: typedef typename almost_type_::type type; | |
153 | }; | |
154 | } | |
155 | namespace detail { | |
156 | template <typename T> struct is_class_impl { | |
157 | }; | |
158 | } | |
159 | namespace detail{ | |
160 | struct false_result { | |
161 | }; | |
162 | } | |
163 | namespace python { | |
164 | namespace detail { | |
165 | template<class T> class borrowed { | |
166 | }; | |
167 | template<typename T> struct is_borrowed_ptr { | |
168 | static const bool value = false; | |
169 | }; | |
170 | } | |
171 | template <class T = PyObject> class handle; | |
172 | template <class T> inline T* incref(T* p) { | |
173 | } | |
174 | template <class T> struct null_ok; | |
175 | namespace detail { | |
176 | template <class T> inline T* manage_ptr(detail::borrowed<null_ok<T> >* p, int) { | |
177 | } | |
178 | } | |
179 | template <class T> class handle { | |
180 | }; | |
181 | template<typename T> class is_handle { | |
182 | public: static const bool value = false; | |
183 | }; | |
184 | } | |
185 | } | |
186 | namespace mpl_ { | |
187 | } | |
188 | namespace boost { | |
189 | namespace mpl { | |
190 | template< typename T , typename Base , int at_front = 0 > struct v_item : Base { | |
191 | }; | |
192 | } | |
193 | namespace mpl { | |
194 | template< typename Dummy = na > struct vector0; | |
195 | template< typename T0 > struct vector1 : v_item< T0 , vector0< > > { | |
196 | }; | |
197 | template< typename T0, typename T1 > struct vector2 : v_item< T1 , vector1<T0> > { | |
198 | }; | |
199 | template< typename T0, typename T1, typename T2 > struct vector3 : v_item< T2 , vector2< T0,T1 > > { | |
200 | }; | |
201 | template< typename T0, typename T1, typename T2, typename T3 > struct vector4 : v_item< T3 , vector3< T0,T1,T2 > > { | |
202 | }; | |
203 | template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 : v_item< T4 , vector4< T0,T1,T2,T3 > > { | |
204 | }; | |
205 | template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector6 : v_item< T5 , vector5< T0,T1,T2,T3,T4 > > { | |
206 | }; | |
207 | template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector7 : v_item< T6 , vector6< T0,T1,T2,T3,T4,T5 > > { | |
208 | }; | |
209 | template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector8 : v_item< T7 , vector7< T0,T1,T2,T3,T4,T5,T6 > > { | |
210 | }; | |
211 | template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector9 : v_item< T8 , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > > { | |
212 | }; | |
213 | } | |
214 | namespace noncopyable_ { | |
215 | class noncopyable { | |
216 | }; | |
217 | } | |
218 | typedef noncopyable_::noncopyable noncopyable; | |
219 | namespace detail { | |
220 | template <typename T> class empty_base { | |
221 | }; | |
222 | } | |
223 | template <class T, class U, class B = ::boost::detail::empty_base<T> > struct less_than_comparable2 : B { | |
224 | }; | |
225 | template <class T, class U, class B = ::boost::detail::empty_base<T> > struct equality_comparable2 : B { | |
226 | }; | |
227 | template <class T, class U, class B = ::boost::detail::empty_base<T> > struct totally_ordered2 : less_than_comparable2<T, U , equality_comparable2<T, U, B > > { | |
228 | }; | |
229 | namespace python { | |
230 | struct instance_holder : private noncopyable { | |
231 | }; | |
232 | namespace detail { | |
233 | template <class T> struct is_auto_ptr : mpl::false_ { | |
234 | }; | |
235 | } | |
236 | namespace detail { | |
237 | template <class T> struct copy_ctor_mutates_rhs : is_auto_ptr<T> { | |
238 | }; | |
239 | } | |
240 | } | |
241 | namespace python { | |
242 | namespace detail { | |
243 | template <bool is_ptr = true> struct pointee_impl { | |
244 | }; | |
245 | }; | |
246 | }; | |
247 | namespace python { | |
248 | namespace detail { | |
249 | } | |
250 | } | |
251 | namespace mpl { | |
252 | namespace aux { | |
253 | template< long C_ > struct not_impl : bool_<!C_> { | |
254 | }; | |
255 | } | |
256 | } | |
257 | namespace python { | |
258 | namespace objects { | |
259 | template <class Pointer, class Value> struct pointer_holder_back_reference : instance_holder { | |
260 | pointer_holder_back_reference(Pointer); | |
261 | private: Pointer m_p; | |
262 | }; | |
263 | template <class Pointer, class Value> inline pointer_holder_back_reference<Pointer,Value>::pointer_holder_back_reference(Pointer p) : m_p(p) { | |
264 | } | |
265 | } | |
266 | } | |
267 | namespace detail { | |
268 | class alignment_dummy; | |
269 | typedef void (*function_ptr)(); | |
270 | typedef int (alignment_dummy::*member_ptr); | |
271 | typedef int (alignment_dummy::*member_function_ptr)(); | |
272 | template <bool found, std::size_t target, class TestType> struct lower_alignment_helper { | |
273 | }; | |
274 | template <typename T> struct has_one_T { | |
275 | }; | |
276 | template <std::size_t target> union lower_alignment { | |
277 | enum { | |
278 | found0 = false }; | |
279 | enum { | |
280 | found1 = lower_alignment_helper<found0,target,char >::value }; | |
281 | enum { | |
282 | found2 = lower_alignment_helper<found1,target,short >::value }; | |
283 | enum { | |
284 | found3 = lower_alignment_helper<found2,target,int >::value }; | |
285 | enum { | |
286 | found4 = lower_alignment_helper<found3,target,long >::value }; | |
287 | enum { | |
288 | found5 = lower_alignment_helper<found4,target,::boost::long_long_type >::value }; | |
289 | enum { | |
290 | found6 = lower_alignment_helper<found5,target,float >::value }; | |
291 | enum { | |
292 | found7 = lower_alignment_helper<found6,target,double >::value }; | |
293 | enum { | |
294 | found8 = lower_alignment_helper<found7,target,long double >::value }; | |
295 | enum { | |
296 | found9 = lower_alignment_helper<found8,target,void* >::value }; | |
297 | enum { | |
298 | found10 = lower_alignment_helper<found9,target,function_ptr >::value }; | |
299 | enum { | |
300 | found11 = lower_alignment_helper<found10,target,member_ptr >::value }; | |
301 | enum { | |
302 | found12 = lower_alignment_helper<found11,target,member_function_ptr >::value }; | |
303 | enum { | |
304 | found13 = lower_alignment_helper<found12,target,boost::detail::has_one_T< char > >::value }; | |
305 | enum { | |
306 | found14 = lower_alignment_helper<found13,target,boost::detail::has_one_T< short > >::value }; | |
307 | enum { | |
308 | found15 = lower_alignment_helper<found14,target,boost::detail::has_one_T< int > >::value }; | |
309 | enum { | |
310 | found16 = lower_alignment_helper<found15,target,boost::detail::has_one_T< long > >::value }; | |
311 | enum { | |
312 | found17 = lower_alignment_helper<found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::value }; | |
313 | enum { | |
314 | found18 = lower_alignment_helper<found17,target,boost::detail::has_one_T< float > >::value }; | |
315 | enum { | |
316 | found19 = lower_alignment_helper<found18,target,boost::detail::has_one_T< double > >::value }; | |
317 | enum { | |
318 | found20 = lower_alignment_helper<found19,target,boost::detail::has_one_T< long double > >::value }; | |
319 | }; | |
320 | } | |
321 | namespace python { | |
322 | namespace detail { | |
323 | template <std::size_t size> union aligned_storage { | |
324 | }; | |
325 | } | |
326 | namespace converter { | |
327 | template <class T> struct rvalue_from_python_storage { | |
328 | }; | |
329 | template <class T> struct rvalue_from_python_data : rvalue_from_python_storage<T> { | |
330 | ~rvalue_from_python_data(); | |
331 | }; | |
332 | namespace detail { | |
333 | }; | |
334 | } | |
335 | } | |
336 | namespace mpl { | |
337 | namespace aux { | |
338 | }; | |
339 | } | |
340 | namespace python { | |
341 | namespace detail { | |
342 | enum { | |
343 | }; | |
344 | } | |
345 | template <class T, class MakeHolder> struct to_python_indirect { | |
346 | }; | |
347 | namespace detail { | |
348 | struct make_owning_holder { | |
349 | }; | |
350 | namespace detail { | |
351 | } | |
352 | } | |
353 | namespace converter { | |
354 | template <class Object, PyTypeObject* pytype> struct pyobject_type { | |
355 | static bool check(PyObject* x) { | |
356 | } | |
357 | }; | |
358 | template <class> struct pyobject_traits; | |
359 | template <class T> struct handle_object_manager_traits : pyobject_traits<typename T::element_type> { | |
360 | static null_ok<typename T::element_type>* adopt(PyObject* p) { | |
361 | } | |
362 | }; | |
363 | template <class T> struct default_object_manager_traits { | |
364 | static const bool is_specialized = python::detail::is_borrowed_ptr<T>::value ; | |
365 | }; | |
366 | template <class T> struct object_manager_traits : mpl::if_c< is_handle<T>::value , handle_object_manager_traits<T> , default_object_manager_traits<T> >::type { | |
367 | }; | |
368 | template <class T> struct is_object_manager : mpl::bool_<object_manager_traits<T>::is_specialized> { | |
369 | }; | |
370 | } | |
371 | namespace detail { | |
372 | template <class X_> struct value_is_shared_ptr { | |
373 | }; | |
374 | } | |
375 | } | |
376 | namespace python { | |
377 | namespace detail { | |
378 | struct signature_element { | |
379 | }; | |
380 | template <unsigned> struct signature_arity; | |
381 | template <> struct signature_arity<11> { | |
382 | template <class Sig> struct impl { | |
383 | }; | |
384 | }; | |
385 | } | |
386 | namespace api { | |
387 | class object; | |
388 | } | |
389 | using api::object; | |
390 | namespace detail { | |
391 | template <class T, class U> struct dependent { | |
392 | }; | |
393 | } | |
394 | } | |
395 | namespace detail{ | |
396 | template <typename T, bool isp, bool b1> struct ct_imp { | |
397 | typedef const T& param_type; | |
398 | }; | |
399 | } | |
400 | template <typename T> struct call_traits { | |
401 | typedef typename boost::detail::ct_imp< T, ::boost::is_pointer<T>::value, ::boost::is_arithmetic<T>::value >::param_type param_type; | |
402 | }; | |
403 | namespace python { | |
404 | namespace detail { | |
405 | } | |
406 | namespace converter { | |
407 | namespace detail { | |
408 | template <class T> struct return_object_manager_from_python { | |
409 | typedef T result_type; | |
410 | result_type operator()(PyObject*) const; | |
411 | }; | |
412 | template <class T> inline T return_object_manager_from_python<T>::operator()(PyObject* obj) const { | |
413 | } | |
414 | } | |
415 | } | |
416 | template <class DerivedVisitor> class def_visitor { | |
417 | }; | |
418 | namespace api { | |
419 | template <class U> class object_operators : public def_visitor<U> { | |
420 | template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> typename detail::dependent<object, A0>::type operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12) const { | |
421 | } | |
422 | }; | |
423 | struct object_base : object_operators<object> { | |
424 | }; | |
425 | } | |
426 | namespace converter { | |
427 | template <class Ptr> struct extract_pointer { | |
428 | }; | |
429 | template <class Ref> struct extract_reference { | |
430 | }; | |
431 | template <class T> struct extract_rvalue : private noncopyable { | |
432 | typedef typename mpl::if_< python::detail::copy_ctor_mutates_rhs<T> , T& , typename call_traits<T>::param_type >::type result_type; | |
433 | mutable rvalue_from_python_data<T> m_data; | |
434 | }; | |
435 | template <class T> struct extract_object_manager { | |
436 | }; | |
437 | template <class T> struct select_extract { | |
438 | static const bool obj_mgr = is_object_manager<T>::value ; | |
439 | static const bool ptr = is_pointer<T>::value ; | |
440 | static const bool ref = is_reference<T>::value ; | |
441 | typedef typename mpl::if_c< obj_mgr , extract_object_manager<T> , typename mpl::if_c< ptr , extract_pointer<T> , typename mpl::if_c< ref , extract_reference<T> , extract_rvalue<T> >::type >::type >::type type; | |
442 | }; | |
443 | } | |
444 | template <class T> struct extract : converter::select_extract<T>::type { | |
445 | private: typedef typename converter::select_extract<T>::type base; | |
446 | public: typedef typename base::result_type result_type; | |
447 | operator result_type() const { | |
448 | } | |
449 | extract(api::object const&); | |
450 | }; | |
451 | } | |
452 | } | |
453 | namespace PySide { | |
454 | class __attribute__ ((visibility("default"))) wrapper { | |
455 | }; | |
456 | } | |
457 | struct QHashData { | |
458 | static QHashData shared_null; | |
459 | }; | |
460 | template <class Key, class T> class QHash { | |
461 | union { | |
462 | QHashData *d; | |
463 | }; | |
464 | public: inline QHash() : d(&QHashData::shared_null) { | |
465 | } | |
466 | T &operator[](const Key &key); | |
467 | }; | |
468 | namespace PySide { | |
469 | template<class T> inline boost::python::handle<> ptr(T* data, bool take_ownership = false) { | |
470 | } | |
471 | class __attribute__ ((visibility("internal"))) type_details { | |
472 | typedef QGenericArgument(*func_python_to_cpp_type)(const boost::python::object&, const char*); | |
473 | public: template<typename T> static type_details* create_object_type_details(const char* type_name) { | |
474 | } | |
475 | template<typename T> static type_details* create_value_type_details(const char* type_name) { | |
476 | type_details* self = new type_details(); | |
477 | self->m_func_python_to_cpp = &python_to_value_type<T>; | |
478 | } | |
479 | func_python_to_cpp_type m_func_python_to_cpp; | |
480 | template <class T> static QGenericArgument python_to_value_type(const boost::python::object& obj, const char *type_name) { | |
481 | T* val = new T(boost::python::extract<T>(obj)); | |
482 | } | |
483 | }; | |
484 | class __attribute__ ((visibility("default"))) type_manager { | |
485 | public: static type_manager& instance(); | |
486 | template<typename T> void __attribute__ ((visibility("internal"))) register_value_type(const char* type_name) { | |
487 | m_type_map[type_name] = type_details::create_value_type_details<T>(type_name); | |
488 | } | |
489 | QHash<QString, type_details* > m_type_map; | |
490 | }; | |
491 | } | |
492 | using namespace PySide; | |
493 | class __attribute__ ((visibility("internal"))) qwebpage_extensionoption_wrapper : public QWebPage::ExtensionOption, public PySide::wrapper { | |
494 | static void define_python_class() throw(); | |
495 | }; | |
496 | void qwebpage_extensionoption_wrapper::define_python_class() throw() { | |
497 | type_manager::instance().register_value_type<QWebPage::ExtensionOption >("QWebPage::ExtensionOption"); | |
498 | } |