1 typedef long unsigned int size_t;
2 namespace std __attribute__ ((__visibility__ ("default"))) {
6 public: inline QString();
7 inline QString(const char *ch) : d(fromAscii_helper(ch)) {
12 static Data *fromAscii_helper(const char *str, int size = -1);
14 class QGenericArgument {
18 class QWebPage : public QObject {
19 public: template <typename T> inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const {
21 class ExtensionOption {
25 typedef struct _object {
31 typedef struct bufferinfo {
39 __extension__ typedef long long long_long_type;
51 template< bool C_ > struct bool_;
52 typedef bool_<false> false_;
53 template< bool C_ > struct bool_ {
54 static const bool value = C_;
56 template< typename T, T N > struct integral_c {
57 static const T value = N;
61 template <class T, T val> struct integral_constant : public mpl::integral_c<T, val> {
64 template <typename T> struct cv_traits_imp {
65 typedef T unqualified_type;
68 template< typename T > struct is_reference : ::boost::integral_constant<bool,false> {
70 template< typename T > struct remove_cv {
71 typedef typename boost::detail::cv_traits_imp<T*>::unqualified_type type;
75 typedef char* yes_convertible;
76 typedef int* no_convertible;
77 template <class Target> struct convertible {
81 template <class Source, class Target> inline Target* upcast(Source* p, yes_convertible, no_convertible, Target*) {
91 struct __numeric_limits_base {
95 template< typename T > struct is_integral : ::boost::integral_constant<bool,false> {
97 template< typename T > struct is_float : ::boost::integral_constant<bool,false> {
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;
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) ;
110 template< typename T > struct is_arithmetic : ::boost::integral_constant<bool,::boost::detail::is_arithmetic_impl<T>::value> {
112 namespace type_traits {
113 template <typename T> struct is_mem_fun_pointer_impl {
114 static const bool value = false;
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> {
119 template< typename T > struct is_member_pointer : ::boost::integral_constant<bool,::boost::is_member_function_pointer<T>::value> {
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;
126 template <bool b> struct ice_not {
127 static const bool value = true;
131 template< typename T > struct is_pointer_helper {
132 static const bool value = false;
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) ;
138 template< typename T > struct is_pointer : ::boost::integral_constant<bool,::boost::detail::is_pointer_impl<T>::value> {
140 template<typename T> class unwrap_reference {
147 template< bool C , typename T1 , typename T2 > struct if_c {
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;
156 template <typename T> struct is_class_impl {
160 struct false_result {
165 template<class T> class borrowed {
167 template<typename T> struct is_borrowed_ptr {
168 static const bool value = false;
171 template <class T = PyObject> class handle;
172 template <class T> inline T* incref(T* p) {
174 template <class T> struct null_ok;
176 template <class T> inline T* manage_ptr(detail::borrowed<null_ok<T> >* p, int) {
179 template <class T> class handle {
181 template<typename T> class is_handle {
182 public: static const bool value = false;
190 template< typename T , typename Base , int at_front = 0 > struct v_item : Base {
194 template< typename Dummy = na > struct vector0;
195 template< typename T0 > struct vector1 : v_item< T0 , vector0< > > {
197 template< typename T0, typename T1 > struct vector2 : v_item< T1 , vector1<T0> > {
199 template< typename T0, typename T1, typename T2 > struct vector3 : v_item< T2 , vector2< T0,T1 > > {
201 template< typename T0, typename T1, typename T2, typename T3 > struct vector4 : v_item< T3 , vector3< T0,T1,T2 > > {
203 template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 : v_item< T4 , vector4< T0,T1,T2,T3 > > {
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 > > {
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 > > {
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 > > {
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 > > {
214 namespace noncopyable_ {
218 typedef noncopyable_::noncopyable noncopyable;
220 template <typename T> class empty_base {
223 template <class T, class U, class B = ::boost::detail::empty_base<T> > struct less_than_comparable2 : B {
225 template <class T, class U, class B = ::boost::detail::empty_base<T> > struct equality_comparable2 : B {
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 > > {
230 struct instance_holder : private noncopyable {
233 template <class T> struct is_auto_ptr : mpl::false_ {
237 template <class T> struct copy_ctor_mutates_rhs : is_auto_ptr<T> {
243 template <bool is_ptr = true> struct pointee_impl {
253 template< long C_ > struct not_impl : bool_<!C_> {
259 template <class Pointer, class Value> struct pointer_holder_back_reference : instance_holder {
260 pointer_holder_back_reference(Pointer);
261 private: Pointer m_p;
263 template <class Pointer, class Value> inline pointer_holder_back_reference<Pointer,Value>::pointer_holder_back_reference(Pointer p) : m_p(p) {
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 {
274 template <typename T> struct has_one_T {
276 template <std::size_t target> union lower_alignment {
280 found1 = lower_alignment_helper<found0,target,char >::value };
282 found2 = lower_alignment_helper<found1,target,short >::value };
284 found3 = lower_alignment_helper<found2,target,int >::value };
286 found4 = lower_alignment_helper<found3,target,long >::value };
288 found5 = lower_alignment_helper<found4,target,::boost::long_long_type >::value };
290 found6 = lower_alignment_helper<found5,target,float >::value };
292 found7 = lower_alignment_helper<found6,target,double >::value };
294 found8 = lower_alignment_helper<found7,target,long double >::value };
296 found9 = lower_alignment_helper<found8,target,void* >::value };
298 found10 = lower_alignment_helper<found9,target,function_ptr >::value };
300 found11 = lower_alignment_helper<found10,target,member_ptr >::value };
302 found12 = lower_alignment_helper<found11,target,member_function_ptr >::value };
304 found13 = lower_alignment_helper<found12,target,boost::detail::has_one_T< char > >::value };
306 found14 = lower_alignment_helper<found13,target,boost::detail::has_one_T< short > >::value };
308 found15 = lower_alignment_helper<found14,target,boost::detail::has_one_T< int > >::value };
310 found16 = lower_alignment_helper<found15,target,boost::detail::has_one_T< long > >::value };
312 found17 = lower_alignment_helper<found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::value };
314 found18 = lower_alignment_helper<found17,target,boost::detail::has_one_T< float > >::value };
316 found19 = lower_alignment_helper<found18,target,boost::detail::has_one_T< double > >::value };
318 found20 = lower_alignment_helper<found19,target,boost::detail::has_one_T< long double > >::value };
323 template <std::size_t size> union aligned_storage {
326 namespace converter {
327 template <class T> struct rvalue_from_python_storage {
329 template <class T> struct rvalue_from_python_data : rvalue_from_python_storage<T> {
330 ~rvalue_from_python_data();
345 template <class T, class MakeHolder> struct to_python_indirect {
348 struct make_owning_holder {
353 namespace converter {
354 template <class Object, PyTypeObject* pytype> struct pyobject_type {
355 static bool check(PyObject* x) {
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) {
363 template <class T> struct default_object_manager_traits {
364 static const bool is_specialized = python::detail::is_borrowed_ptr<T>::value ;
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 {
368 template <class T> struct is_object_manager : mpl::bool_<object_manager_traits<T>::is_specialized> {
372 template <class X_> struct value_is_shared_ptr {
378 struct signature_element {
380 template <unsigned> struct signature_arity;
381 template <> struct signature_arity<11> {
382 template <class Sig> struct impl {
391 template <class T, class U> struct dependent {
396 template <typename T, bool isp, bool b1> struct ct_imp {
397 typedef const T& param_type;
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;
406 namespace converter {
408 template <class T> struct return_object_manager_from_python {
409 typedef T result_type;
410 result_type operator()(PyObject*) const;
412 template <class T> inline T return_object_manager_from_python<T>::operator()(PyObject* obj) const {
416 template <class DerivedVisitor> class def_visitor {
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 {
423 struct object_base : object_operators<object> {
426 namespace converter {
427 template <class Ptr> struct extract_pointer {
429 template <class Ref> struct extract_reference {
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;
435 template <class T> struct extract_object_manager {
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;
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 {
449 extract(api::object const&);
454 class __attribute__ ((visibility("default"))) wrapper {
458 static QHashData shared_null;
460 template <class Key, class T> class QHash {
464 public: inline QHash() : d(&QHashData::shared_null) {
466 T &operator[](const Key &key);
469 template<class T> inline boost::python::handle<> ptr(T* data, bool take_ownership = false) {
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) {
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>;
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));
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);
489 QHash<QString, type_details* > m_type_map;
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();
496 void qwebpage_extensionoption_wrapper::define_python_class() throw() {
497 type_manager::instance().register_value_type<QWebPage::ExtensionOption >("QWebPage::ExtensionOption");