#include "foomodule4.h"
static PyMethodDef foo4_TopNs_PrefixBottomNs_functions[] = {
    {NULL, NULL, 0, NULL}
};
/* --- classes --- */


static PyObject *
initfoo4_TopNs_PrefixBottomNs(void)
{
    PyObject *m;
    m = Py_InitModule3((char *) "foo4.TopNs.PrefixBottomNs", foo4_TopNs_PrefixBottomNs_functions, NULL);
    if (m == NULL) {
        return NULL;
    }
    /* Register the 'TopNs::PrefixBottomNs::PrefixInner' class */
    PyTopNsPrefixBottomNsPrefixInner_Type.tp_base = &PyTopNsOuterBase_Type;
    if (PyType_Ready(&PyTopNsPrefixBottomNsPrefixInner_Type)) {
        return NULL;
    }
    PyModule_AddObject(m, (char *) "PrefixInner", (PyObject *) &PyTopNsPrefixBottomNsPrefixInner_Type);
    return m;
}
static PyMethodDef foo4_TopNs_functions[] = {
    {NULL, NULL, 0, NULL}
};
/* --- classes --- */


static PyObject *
initfoo4_TopNs(void)
{
    PyObject *m;
    PyObject *submodule;
    m = Py_InitModule3((char *) "foo4.TopNs", foo4_TopNs_functions, NULL);
    if (m == NULL) {
        return NULL;
    }
    /* Register the 'TopNs::OuterBase' class */
    if (PyType_Ready(&PyTopNsOuterBase_Type)) {
        return NULL;
    }
    PyModule_AddObject(m, (char *) "OuterBase", (PyObject *) &PyTopNsOuterBase_Type);
    submodule = initfoo4_TopNs_PrefixBottomNs();
    if (submodule == NULL) {
        return NULL;
    }
    Py_INCREF(submodule);
    PyModule_AddObject(m, (char *) "PrefixBottomNs", submodule);
    return m;
}
static PyMethodDef foo4_std_functions[] = {
    {NULL, NULL, 0, NULL}
};

static PyObject *
initfoo4_std(void)
{
    PyObject *m;
    m = Py_InitModule3((char *) "foo4.std", foo4_std_functions, NULL);
    if (m == NULL) {
        return NULL;
    }
    return m;
}
/* --- module functions --- */

PyObject * _wrap_foo4_xptoset_foo_type_ptr(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4_xptoget_foo_datum(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4_xptoget_flow_id(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4_xptoget_foo_type();
PyObject * _wrap_foo4_xptoset_foo_type(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4_xptosome_function();
PyObject * _wrap_foo4_xptoset_foo_type_inout(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
static PyMethodDef foo4_xpto_functions[] = {
    {(char *) "set_foo_type_ptr", (PyCFunction) _wrap_foo4_xptoset_foo_type_ptr, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "get_foo_datum", (PyCFunction) _wrap_foo4_xptoget_foo_datum, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "get_flow_id", (PyCFunction) _wrap_foo4_xptoget_flow_id, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "get_foo_type", (PyCFunction) _wrap_foo4_xptoget_foo_type, METH_NOARGS, NULL },
    {(char *) "set_foo_type", (PyCFunction) _wrap_foo4_xptoset_foo_type, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "some_function", (PyCFunction) _wrap_foo4_xptosome_function, METH_NOARGS, NULL },
    {(char *) "set_foo_type_inout", (PyCFunction) _wrap_foo4_xptoset_foo_type_inout, METH_KEYWORDS|METH_VARARGS, NULL },
    {NULL, NULL, 0, NULL}
};
/* --- classes --- */

/* --- enumerations --- */


static PyObject *
initfoo4_xpto(void)
{
    PyObject *m;
    m = Py_InitModule3((char *) "foo4.xpto", foo4_xpto_functions, NULL);
    if (m == NULL) {
        return NULL;
    }
    /* Register the 'xpto::SomeClass' class */
    if (PyType_Ready(&PyXptoSomeClass_Type)) {
        return NULL;
    }
    PyModule_AddObject(m, (char *) "SomeClass", (PyObject *) &PyXptoSomeClass_Type);
    PyModule_AddObject(m, (char *) "FooXpto", (PyObject *) &PyFoo_Type);
    PyModule_AddIntConstant(m, (char *) "FOO_TYPE_AAA", xpto::FOO_TYPE_AAA);
    PyModule_AddIntConstant(m, (char *) "FOO_TYPE_BBB", xpto::FOO_TYPE_BBB);
    PyModule_AddIntConstant(m, (char *) "FOO_TYPE_CCC", xpto::FOO_TYPE_CCC);
    return m;
}
/* --- module functions --- */

PyObject * _wrap_foo4my_inverse_func(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4print_something(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4my_inverse_func2(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4take_some_object();
PyObject * _wrap_foo4get_simple_list();
PyObject * _wrap_foo4set_foobar_with_other_as_custodian(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4get_map();
PyObject * _wrap_foo4get_cannot_be_constructed_ptr();
PyObject * _wrap_foo4create_new_foobar();
PyObject * _wrap_foo4get_hidden_subclass_pointer();
PyObject * _wrap_foo4function_that_takes_foo(PyObject *self, PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4store_some_object(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4print_something_else(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4get_set();
PyObject * _wrap_foo4get_foobar_with_other_as_custodian(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4make_interface_id();
PyObject * _wrap_foo4function_that_returns_foo();
PyObject * _wrap_foo4set_simple_list(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4delete_some_object();
PyObject * _wrap_foo4set_foobar_with_return_as_custodian(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4delete_stored_zbr();
PyObject * _wrap_foo4get_cannot_be_constructed_value();
PyObject * _wrap_foo4invoke_some_object_get_prefix();
PyObject * _wrap_foo4TypeNameGet__lt__int__gt__();
PyObject * _wrap_foo4get_int_from_float(PyObject *self, PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4get_abstract_base_class_ptr1();
PyObject * _wrap_foo4store_zbr(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4matrix_sum_of_elements(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject * _wrap_foo4matrix_identity_new();
PyObject * _wrap_foo4invoke_zbr(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
static PyMethodDef foo4_functions[] = {
    {(char *) "my_inverse_func", (PyCFunction) _wrap_foo4my_inverse_func, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "print_something", (PyCFunction) _wrap_foo4print_something, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "my_inverse_func2", (PyCFunction) _wrap_foo4my_inverse_func2, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "take_some_object", (PyCFunction) _wrap_foo4take_some_object, METH_NOARGS, NULL },
    {(char *) "get_simple_list", (PyCFunction) _wrap_foo4get_simple_list, METH_NOARGS, NULL },
    {(char *) "set_foobar_with_other_as_custodian", (PyCFunction) _wrap_foo4set_foobar_with_other_as_custodian, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "get_map", (PyCFunction) _wrap_foo4get_map, METH_NOARGS, NULL },
    {(char *) "get_cannot_be_constructed_ptr", (PyCFunction) _wrap_foo4get_cannot_be_constructed_ptr, METH_NOARGS, NULL },
    {(char *) "create_new_foobar", (PyCFunction) _wrap_foo4create_new_foobar, METH_NOARGS, NULL },
    {(char *) "get_hidden_subclass_pointer", (PyCFunction) _wrap_foo4get_hidden_subclass_pointer, METH_NOARGS, NULL },
    {(char *) "function_that_takes_foo", (PyCFunction) _wrap_foo4function_that_takes_foo, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "store_some_object", (PyCFunction) _wrap_foo4store_some_object, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "print_something_else", (PyCFunction) _wrap_foo4print_something_else, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "get_set", (PyCFunction) _wrap_foo4get_set, METH_NOARGS, NULL },
    {(char *) "get_foobar_with_other_as_custodian", (PyCFunction) _wrap_foo4get_foobar_with_other_as_custodian, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "make_interface_id", (PyCFunction) _wrap_foo4make_interface_id, METH_NOARGS, NULL },
    {(char *) "function_that_returns_foo", (PyCFunction) _wrap_foo4function_that_returns_foo, METH_NOARGS, NULL },
    {(char *) "set_simple_list", (PyCFunction) _wrap_foo4set_simple_list, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "delete_some_object", (PyCFunction) _wrap_foo4delete_some_object, METH_NOARGS, NULL },
    {(char *) "set_foobar_with_return_as_custodian", (PyCFunction) _wrap_foo4set_foobar_with_return_as_custodian, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "delete_stored_zbr", (PyCFunction) _wrap_foo4delete_stored_zbr, METH_NOARGS, NULL },
    {(char *) "get_cannot_be_constructed_value", (PyCFunction) _wrap_foo4get_cannot_be_constructed_value, METH_NOARGS, NULL },
    {(char *) "invoke_some_object_get_prefix", (PyCFunction) _wrap_foo4invoke_some_object_get_prefix, METH_NOARGS, NULL },
    {(char *) "IntegerTypeNameGet", (PyCFunction) _wrap_foo4TypeNameGet__lt__int__gt__, METH_NOARGS, NULL },
    {(char *) "get_int", (PyCFunction) _wrap_foo4get_int_from_float, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "get_abstract_base_class_ptr1", (PyCFunction) _wrap_foo4get_abstract_base_class_ptr1, METH_NOARGS, NULL },
    {(char *) "store_zbr", (PyCFunction) _wrap_foo4store_zbr, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "matrix_sum_of_elements", (PyCFunction) _wrap_foo4matrix_sum_of_elements, METH_KEYWORDS|METH_VARARGS, NULL },
    {(char *) "matrix_identity_new", (PyCFunction) _wrap_foo4matrix_identity_new, METH_NOARGS, NULL },
    {(char *) "invoke_zbr", (PyCFunction) _wrap_foo4invoke_zbr, METH_KEYWORDS|METH_VARARGS, NULL },
    {NULL, NULL, 0, NULL}
};
/* --- classes --- */

/* --- containers --- */



static void
Pystd__map__lt___std__string__int___gt__Iter__tp_clear(Pystd__map__lt___std__string__int___gt__Iter *self)
{
    Py_CLEAR(self->container);
    delete self->iterator;
    self->iterator = NULL;

}


static int
Pystd__map__lt___std__string__int___gt__Iter__tp_traverse(Pystd__map__lt___std__string__int___gt__Iter *self, visitproc visit, void *arg)
{
    Py_VISIT((PyObject *) self->container);
    return 0;
}


static void
_wrap_Pystd__map__lt___std__string__int___gt____tp_dealloc(Pystd__map__lt___std__string__int___gt__ *self)
{
    delete self->obj;
    self->obj = NULL;

    self->ob_type->tp_free((PyObject*)self);
}


static void
_wrap_Pystd__map__lt___std__string__int___gt__Iter__tp_dealloc(Pystd__map__lt___std__string__int___gt__Iter *self)
{
    Py_CLEAR(self->container);
    delete self->iterator;
    self->iterator = NULL;

    self->ob_type->tp_free((PyObject*)self);
}


static PyObject*
_wrap_Pystd__map__lt___std__string__int___gt____tp_iter(Pystd__map__lt___std__string__int___gt__ *self)
{
    Pystd__map__lt___std__string__int___gt__Iter *iter = PyObject_GC_New(Pystd__map__lt___std__string__int___gt__Iter, &Pystd__map__lt___std__string__int___gt__Iter_Type);
    Py_INCREF(self);
    iter->container = self;
    iter->iterator = new std::map< std::string, int >::iterator(self->obj->begin());
    return (PyObject*) iter;
}


static PyObject*
_wrap_Pystd__map__lt___std__string__int___gt__Iter__tp_iter(Pystd__map__lt___std__string__int___gt__Iter *self)
{
    Py_INCREF(self);
    return (PyObject*) self;
}

static PyObject* _wrap_Pystd__map__lt___std__string__int___gt__Iter__tp_iternext(Pystd__map__lt___std__string__int___gt__Iter *self)
{
    PyObject *py_retval;
    std::map< std::string, int >::iterator iter;
    
    iter = *self->iterator;
    if (iter == self->container->obj->end()) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    ++(*self->iterator);
    py_retval = Py_BuildValue((char *) "s#i", (iter->first).c_str(), (iter->first).size(), iter->second);
    return py_retval;
}

int _wrap_convert_py2c__std__map__lt___std__string__int___gt__(PyObject *arg, std::map< std::string, int > *container)
{
    if (PyObject_IsInstance(arg, (PyObject*) &Pystd__map__lt___std__string__int___gt___Type)) {
        *container = *((Pystd__map__lt___std__string__int___gt__*)arg)->obj;
    } else if (PyList_Check(arg)) {
        container->clear();
        Py_ssize_t size = PyList_Size(arg);
        for (Py_ssize_t i = 0; i < size; i++) {
            PyObject *tup = PyList_GET_ITEM(arg, i);
            if (!PyTuple_Check(tup) || PyTuple_Size(tup) != 2) {
                PyErr_SetString(PyExc_TypeError, "items must be tuples with two elements");
                return 0;
            }
            std::pair<std::string, int> item;
            if (!_wrap_convert_py2c__std__string(PyTuple_GET_ITEM(tup, 0), &item.first)) {
                return 0;
            }
            if (!_wrap_convert_py2c__int(PyTuple_GET_ITEM(tup, 1), &item.second)) {
                return 0;
            }
            container->insert(item);
        }
    } else {
        PyErr_SetString(PyExc_TypeError, "parameter must be None, a Std__map__lt___std__string__int___gt__ instance, or a list of int");
        return 0;
    }
    return 1;
}


static int
_wrap_Pystd__map__lt___std__string__int___gt____tp_init(Pystd__map__lt___std__string__int___gt__ *self, PyObject *args, PyObject *kwargs)
{
    const char *keywords[] = {"arg", NULL};
    PyObject *arg = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "|O", (char **) keywords, &arg)) {
        return -1;
    }

    self->obj = new std::map< std::string, int >;

    if (arg == NULL)
        return 0;

    if (!_wrap_convert_py2c__std__map__lt___std__string__int___gt__(arg, self->obj)) {
        delete self->obj;
        self->obj = NULL;
        return -1;
    }
    return 0;
}

PyTypeObject Pystd__map__lt___std__string__int___gt___Type = {
    PyObject_HEAD_INIT(NULL)
    0,                                 /* ob_size */
    (char *) "foo4.Std__map__lt___std__string__int___gt__",            /* tp_name */
    sizeof(Pystd__map__lt___std__string__int___gt__),                  /* tp_basicsize */
    0,                                 /* tp_itemsize */
    /* methods */
    (destructor)_wrap_Pystd__map__lt___std__string__int___gt____tp_dealloc,        /* tp_dealloc */
    (printfunc)0,                      /* tp_print */
    (getattrfunc)NULL,       /* tp_getattr */
    (setattrfunc)NULL,       /* tp_setattr */
    (cmpfunc)NULL,           /* tp_compare */
    (reprfunc)NULL,             /* tp_repr */
    (PyNumberMethods*)NULL,     /* tp_as_number */
    (PySequenceMethods*)NULL, /* tp_as_sequence */
    (PyMappingMethods*)NULL,   /* tp_as_mapping */
    (hashfunc)NULL,             /* tp_hash */
    (ternaryfunc)NULL,          /* tp_call */
    (reprfunc)NULL,              /* tp_str */
    (getattrofunc)NULL,     /* tp_getattro */
    (setattrofunc)NULL,     /* tp_setattro */
    (PyBufferProcs*)NULL,  /* tp_as_buffer */
    Py_TPFLAGS_DEFAULT,                      /* tp_flags */
    NULL,                        /* Documentation string */
    (traverseproc)NULL,     /* tp_traverse */
    (inquiry)NULL,             /* tp_clear */
    (richcmpfunc)NULL,   /* tp_richcompare */
    0,             /* tp_weaklistoffset */
    (getiterfunc)_wrap_Pystd__map__lt___std__string__int___gt____tp_iter,          /* tp_iter */
    (iternextfunc)NULL,     /* tp_iternext */
    (struct PyMethodDef*)NULL, /* tp_methods */
    (struct PyMemberDef*)0,              /* tp_members */
    NULL,                     /* tp_getset */
    NULL,                              /* tp_base */
    NULL,                              /* tp_dict */
    (descrgetfunc)NULL,    /* tp_descr_get */
    (descrsetfunc)NULL,    /* tp_descr_set */
    0,                 /* tp_dictoffset */
    (initproc)_wrap_Pystd__map__lt___std__string__int___gt____tp_init,             /* tp_init */
    (allocfunc)PyType_GenericAlloc,           /* tp_alloc */
    (newfunc)PyType_GenericNew,               /* tp_new */
    (freefunc)0,             /* tp_free */
    (inquiry)NULL,             /* tp_is_gc */
    NULL,                              /* tp_bases */
    NULL,                              /* tp_mro */
    NULL,                              /* tp_cache */
    NULL,                              /* tp_subclasses */
    NULL,                              /* tp_weaklist */
    (destructor) NULL                  /* tp_del */
};

PyTypeObject Pystd__map__lt___std__string__int___gt__Iter_Type = {
    PyObject_HEAD_INIT(NULL)
    0,                                 /* ob_size */
    (char *) "foo4.Std__map__lt___std__string__int___gt__Iter",            /* tp_name */
    sizeof(Pystd__map__lt___std__string__int___gt__Iter),                  /* tp_basicsize */
    0,                                 /* tp_itemsize */
    /* methods */
    (destructor)_wrap_Pystd__map__lt___std__string__int___gt__Iter__tp_dealloc,        /* tp_dealloc */
    (printfunc)0,                      /* tp_print */
    (getattrfunc)NULL,       /* tp_getattr */
    (setattrfunc)NULL,       /* tp_setattr */
    (cmpfunc)NULL,           /* tp_compare */
    (reprfunc)NULL,             /* tp_repr */
    (PyNumberMethods*)NULL,     /* tp_as_number */
    (PySequenceMethods*)NULL, /* tp_as_sequence */
    (PyMappingMethods*)NULL,   /* tp_as_mapping */
    (hashfunc)NULL,             /* tp_hash */
    (ternaryfunc)NULL,          /* tp_call */
    (reprfunc)NULL,              /* tp_str */
    (getattrofunc)NULL,     /* tp_getattro */
    (setattrofunc)NULL,     /* tp_setattro */
    (PyBufferProcs*)NULL,  /* tp_as_buffer */
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC,                      /* tp_flags */
    NULL,                        /* Documentation string */
    (traverseproc)Pystd__map__lt___std__string__int___gt__Iter__tp_traverse,     /* tp_traverse */
    (inquiry)Pystd__map__lt___std__string__int___gt__Iter__tp_clear,             /* tp_clear */
    (richcmpfunc)NULL,   /* tp_richcompare */
    0,             /* tp_weaklistoffset */
    (getiterfunc)_wrap_Pystd__map__lt___std__string__int___gt__Iter__tp_iter,          /* tp_iter */
    (iternextfunc)_wrap_Pystd__map__lt___std__string__int___gt__Iter__tp_iternext,     /* tp_iternext */
    (struct PyMethodDef*)NULL, /* tp_methods */
    (struct PyMemberDef*)0,              /* tp_members */
    NULL,                     /* tp_getset */
    NULL,                              /* tp_base */
    NULL,                              /* tp_dict */
    (descrgetfunc)NULL,    /* tp_descr_get */
    (descrsetfunc)NULL,    /* tp_descr_set */
    0,                 /* tp_dictoffset */
    (initproc)NULL,             /* tp_init */
    (allocfunc)PyType_GenericAlloc,           /* tp_alloc */
    (newfunc)PyType_GenericNew,               /* tp_new */
    (freefunc)0,             /* tp_free */
    (inquiry)NULL,             /* tp_is_gc */
    NULL,                              /* tp_bases */
    NULL,                              /* tp_mro */
    NULL,                              /* tp_cache */
    NULL,                              /* tp_subclasses */
    NULL,                              /* tp_weaklist */
    (destructor) NULL                  /* tp_del */
};




static void
Pystd__set__lt___unsigned_int___gt__Iter__tp_clear(Pystd__set__lt___unsigned_int___gt__Iter *self)
{
    Py_CLEAR(self->container);
    delete self->iterator;
    self->iterator = NULL;

}


static int
Pystd__set__lt___unsigned_int___gt__Iter__tp_traverse(Pystd__set__lt___unsigned_int___gt__Iter *self, visitproc visit, void *arg)
{
    Py_VISIT((PyObject *) self->container);
    return 0;
}


static void
_wrap_Pystd__set__lt___unsigned_int___gt____tp_dealloc(Pystd__set__lt___unsigned_int___gt__ *self)
{
    delete self->obj;
    self->obj = NULL;

    self->ob_type->tp_free((PyObject*)self);
}


static void
_wrap_Pystd__set__lt___unsigned_int___gt__Iter__tp_dealloc(Pystd__set__lt___unsigned_int___gt__Iter *self)
{
    Py_CLEAR(self->container);
    delete self->iterator;
    self->iterator = NULL;

    self->ob_type->tp_free((PyObject*)self);
}


static PyObject*
_wrap_Pystd__set__lt___unsigned_int___gt____tp_iter(Pystd__set__lt___unsigned_int___gt__ *self)
{
    Pystd__set__lt___unsigned_int___gt__Iter *iter = PyObject_GC_New(Pystd__set__lt___unsigned_int___gt__Iter, &Pystd__set__lt___unsigned_int___gt__Iter_Type);
    Py_INCREF(self);
    iter->container = self;
    iter->iterator = new std::set< unsigned int >::iterator(self->obj->begin());
    return (PyObject*) iter;
}


static PyObject*
_wrap_Pystd__set__lt___unsigned_int___gt__Iter__tp_iter(Pystd__set__lt___unsigned_int___gt__Iter *self)
{
    Py_INCREF(self);
    return (PyObject*) self;
}

static PyObject* _wrap_Pystd__set__lt___unsigned_int___gt__Iter__tp_iternext(Pystd__set__lt___unsigned_int___gt__Iter *self)
{
    PyObject *py_retval;
    std::set< unsigned int >::iterator iter;
    
    iter = *self->iterator;
    if (iter == self->container->obj->end()) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    ++(*self->iterator);
    py_retval = Py_BuildValue((char *) "N", PyLong_FromUnsignedLong((*iter)));
    return py_retval;
}

int _wrap_convert_py2c__unsigned_int(PyObject *value, unsigned int *address)
{
    PyObject *py_retval;
    
    py_retval = Py_BuildValue((char *) "(O)", value);
    if (!PyArg_ParseTuple(py_retval, (char *) "I", &*address)) {
        Py_DECREF(py_retval);
        return 0;
    }
    Py_DECREF(py_retval);
    return 1;
}


int _wrap_convert_py2c__std__set__lt___unsigned_int___gt__(PyObject *arg, std::set< unsigned int > *container)
{
    if (PyObject_IsInstance(arg, (PyObject*) &Pystd__set__lt___unsigned_int___gt___Type)) {
        *container = *((Pystd__set__lt___unsigned_int___gt__*)arg)->obj;
    } else if (PyList_Check(arg)) {
        container->clear();
        Py_ssize_t size = PyList_Size(arg);
        for (Py_ssize_t i = 0; i < size; i++) {
            unsigned int item;
            if (!_wrap_convert_py2c__unsigned_int(PyList_GET_ITEM(arg, i), &item)) {
                return 0;
            }
            container->insert(item);
        }
    } else {
        PyErr_SetString(PyExc_TypeError, "parameter must be None, a Std__set__lt___unsigned_int___gt__ instance, or a list of unsigned int");
        return 0;
    }
    return 1;
}


static int
_wrap_Pystd__set__lt___unsigned_int___gt____tp_init(Pystd__set__lt___unsigned_int___gt__ *self, PyObject *args, PyObject *kwargs)
{
    const char *keywords[] = {"arg", NULL};
    PyObject *arg = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "|O", (char **) keywords, &arg)) {
        return -1;
    }

    self->obj = new std::set< unsigned int >;

    if (arg == NULL)
        return 0;

    if (!_wrap_convert_py2c__std__set__lt___unsigned_int___gt__(arg, self->obj)) {
        delete self->obj;
        self->obj = NULL;
        return -1;
    }
    return 0;
}

PyTypeObject Pystd__set__lt___unsigned_int___gt___Type = {
    PyObject_HEAD_INIT(NULL)
    0,                                 /* ob_size */
    (char *) "foo4.Std__set__lt___unsigned_int___gt__",            /* tp_name */
    sizeof(Pystd__set__lt___unsigned_int___gt__),                  /* tp_basicsize */
    0,                                 /* tp_itemsize */
    /* methods */
    (destructor)_wrap_Pystd__set__lt___unsigned_int___gt____tp_dealloc,        /* tp_dealloc */
    (printfunc)0,                      /* tp_print */
    (getattrfunc)NULL,       /* tp_getattr */
    (setattrfunc)NULL,       /* tp_setattr */
    (cmpfunc)NULL,           /* tp_compare */
    (reprfunc)NULL,             /* tp_repr */
    (PyNumberMethods*)NULL,     /* tp_as_number */
    (PySequenceMethods*)NULL, /* tp_as_sequence */
    (PyMappingMethods*)NULL,   /* tp_as_mapping */
    (hashfunc)NULL,             /* tp_hash */
    (ternaryfunc)NULL,          /* tp_call */
    (reprfunc)NULL,              /* tp_str */
    (getattrofunc)NULL,     /* tp_getattro */
    (setattrofunc)NULL,     /* tp_setattro */
    (PyBufferProcs*)NULL,  /* tp_as_buffer */
    Py_TPFLAGS_DEFAULT,                      /* tp_flags */
    NULL,                        /* Documentation string */
    (traverseproc)NULL,     /* tp_traverse */
    (inquiry)NULL,             /* tp_clear */
    (richcmpfunc)NULL,   /* tp_richcompare */
    0,             /* tp_weaklistoffset */
    (getiterfunc)_wrap_Pystd__set__lt___unsigned_int___gt____tp_iter,          /* tp_iter */
    (iternextfunc)NULL,     /* tp_iternext */
    (struct PyMethodDef*)NULL, /* tp_methods */
    (struct PyMemberDef*)0,              /* tp_members */
    NULL,                     /* tp_getset */
    NULL,                              /* tp_base */
    NULL,                              /* tp_dict */
    (descrgetfunc)NULL,    /* tp_descr_get */
    (descrsetfunc)NULL,    /* tp_descr_set */
    0,                 /* tp_dictoffset */
    (initproc)_wrap_Pystd__set__lt___unsigned_int___gt____tp_init,             /* tp_init */
    (allocfunc)PyType_GenericAlloc,           /* tp_alloc */
    (newfunc)PyType_GenericNew,               /* tp_new */
    (freefunc)0,             /* tp_free */
    (inquiry)NULL,             /* tp_is_gc */
    NULL,                              /* tp_bases */
    NULL,                              /* tp_mro */
    NULL,                              /* tp_cache */
    NULL,                              /* tp_subclasses */
    NULL,                              /* tp_weaklist */
    (destructor) NULL                  /* tp_del */
};

PyTypeObject Pystd__set__lt___unsigned_int___gt__Iter_Type = {
    PyObject_HEAD_INIT(NULL)
    0,                                 /* ob_size */
    (char *) "foo4.Std__set__lt___unsigned_int___gt__Iter",            /* tp_name */
    sizeof(Pystd__set__lt___unsigned_int___gt__Iter),                  /* tp_basicsize */
    0,                                 /* tp_itemsize */
    /* methods */
    (destructor)_wrap_Pystd__set__lt___unsigned_int___gt__Iter__tp_dealloc,        /* tp_dealloc */
    (printfunc)0,                      /* tp_print */
    (getattrfunc)NULL,       /* tp_getattr */
    (setattrfunc)NULL,       /* tp_setattr */
    (cmpfunc)NULL,           /* tp_compare */
    (reprfunc)NULL,             /* tp_repr */
    (PyNumberMethods*)NULL,     /* tp_as_number */
    (PySequenceMethods*)NULL, /* tp_as_sequence */
    (PyMappingMethods*)NULL,   /* tp_as_mapping */
    (hashfunc)NULL,             /* tp_hash */
    (ternaryfunc)NULL,          /* tp_call */
    (reprfunc)NULL,              /* tp_str */
    (getattrofunc)NULL,     /* tp_getattro */
    (setattrofunc)NULL,     /* tp_setattro */
    (PyBufferProcs*)NULL,  /* tp_as_buffer */
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC,                      /* tp_flags */
    NULL,                        /* Documentation string */
    (traverseproc)Pystd__set__lt___unsigned_int___gt__Iter__tp_traverse,     /* tp_traverse */
    (inquiry)Pystd__set__lt___unsigned_int___gt__Iter__tp_clear,             /* tp_clear */
    (richcmpfunc)NULL,   /* tp_richcompare */
    0,             /* tp_weaklistoffset */
    (getiterfunc)_wrap_Pystd__set__lt___unsigned_int___gt__Iter__tp_iter,          /* tp_iter */
    (iternextfunc)_wrap_Pystd__set__lt___unsigned_int___gt__Iter__tp_iternext,     /* tp_iternext */
    (struct PyMethodDef*)NULL, /* tp_methods */
    (struct PyMemberDef*)0,              /* tp_members */
    NULL,                     /* tp_getset */
    NULL,                              /* tp_base */
    NULL,                              /* tp_dict */
    (descrgetfunc)NULL,    /* tp_descr_get */
    (descrsetfunc)NULL,    /* tp_descr_set */
    0,                 /* tp_dictoffset */
    (initproc)NULL,             /* tp_init */
    (allocfunc)PyType_GenericAlloc,           /* tp_alloc */
    (newfunc)PyType_GenericNew,               /* tp_new */
    (freefunc)0,             /* tp_free */
    (inquiry)NULL,             /* tp_is_gc */
    NULL,                              /* tp_bases */
    NULL,                              /* tp_mro */
    NULL,                              /* tp_cache */
    NULL,                              /* tp_subclasses */
    NULL,                              /* tp_weaklist */
    (destructor) NULL                  /* tp_del */
};




static void
Pystd__set__lt___float___gt__Iter__tp_clear(Pystd__set__lt___float___gt__Iter *self)
{
    Py_CLEAR(self->container);
    delete self->iterator;
    self->iterator = NULL;

}


static int
Pystd__set__lt___float___gt__Iter__tp_traverse(Pystd__set__lt___float___gt__Iter *self, visitproc visit, void *arg)
{
    Py_VISIT((PyObject *) self->container);
    return 0;
}


static void
_wrap_Pystd__set__lt___float___gt____tp_dealloc(Pystd__set__lt___float___gt__ *self)
{
    delete self->obj;
    self->obj = NULL;

    self->ob_type->tp_free((PyObject*)self);
}


static void
_wrap_Pystd__set__lt___float___gt__Iter__tp_dealloc(Pystd__set__lt___float___gt__Iter *self)
{
    Py_CLEAR(self->container);
    delete self->iterator;
    self->iterator = NULL;

    self->ob_type->tp_free((PyObject*)self);
}


static PyObject*
_wrap_Pystd__set__lt___float___gt____tp_iter(Pystd__set__lt___float___gt__ *self)
{
    Pystd__set__lt___float___gt__Iter *iter = PyObject_GC_New(Pystd__set__lt___float___gt__Iter, &Pystd__set__lt___float___gt__Iter_Type);
    Py_INCREF(self);
    iter->container = self;
    iter->iterator = new std::set< float >::iterator(self->obj->begin());
    return (PyObject*) iter;
}


static PyObject*
_wrap_Pystd__set__lt___float___gt__Iter__tp_iter(Pystd__set__lt___float___gt__Iter *self)
{
    Py_INCREF(self);
    return (PyObject*) self;
}

static PyObject* _wrap_Pystd__set__lt___float___gt__Iter__tp_iternext(Pystd__set__lt___float___gt__Iter *self)
{
    PyObject *py_retval;
    std::set< float >::iterator iter;
    
    iter = *self->iterator;
    if (iter == self->container->obj->end()) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    ++(*self->iterator);
    py_retval = Py_BuildValue((char *) "f", (*iter));
    return py_retval;
}

int _wrap_convert_py2c__float(PyObject *value, float *address)
{
    PyObject *py_retval;
    
    py_retval = Py_BuildValue((char *) "(O)", value);
    if (!PyArg_ParseTuple(py_retval, (char *) "f", &*address)) {
        Py_DECREF(py_retval);
        return 0;
    }
    Py_DECREF(py_retval);
    return 1;
}


int _wrap_convert_py2c__std__set__lt___float___gt__(PyObject *arg, std::set< float > *container)
{
    if (PyObject_IsInstance(arg, (PyObject*) &Pystd__set__lt___float___gt___Type)) {
        *container = *((Pystd__set__lt___float___gt__*)arg)->obj;
    } else if (PyList_Check(arg)) {
        container->clear();
        Py_ssize_t size = PyList_Size(arg);
        for (Py_ssize_t i = 0; i < size; i++) {
            float item;
            if (!_wrap_convert_py2c__float(PyList_GET_ITEM(arg, i), &item)) {
                return 0;
            }
            container->insert(item);
        }
    } else {
        PyErr_SetString(PyExc_TypeError, "parameter must be None, a Std__set__lt___float___gt__ instance, or a list of float");
        return 0;
    }
    return 1;
}


static int
_wrap_Pystd__set__lt___float___gt____tp_init(Pystd__set__lt___float___gt__ *self, PyObject *args, PyObject *kwargs)
{
    const char *keywords[] = {"arg", NULL};
    PyObject *arg = NULL;

    if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "|O", (char **) keywords, &arg)) {
        return -1;
    }

    self->obj = new std::set< float >;

    if (arg == NULL)
        return 0;

    if (!_wrap_convert_py2c__std__set__lt___float___gt__(arg, self->obj)) {
        delete self->obj;
        self->obj = NULL;
        return -1;
    }
    return 0;
}

PyTypeObject Pystd__set__lt___float___gt___Type = {
    PyObject_HEAD_INIT(NULL)
    0,                                 /* ob_size */
    (char *) "foo4.Std__set__lt___float___gt__",            /* tp_name */
    sizeof(Pystd__set__lt___float___gt__),                  /* tp_basicsize */
    0,                                 /* tp_itemsize */
    /* methods */
    (destructor)_wrap_Pystd__set__lt___float___gt____tp_dealloc,        /* tp_dealloc */
    (printfunc)0,                      /* tp_print */
    (getattrfunc)NULL,       /* tp_getattr */
    (setattrfunc)NULL,       /* tp_setattr */
    (cmpfunc)NULL,           /* tp_compare */
    (reprfunc)NULL,             /* tp_repr */
    (PyNumberMethods*)NULL,     /* tp_as_number */
    (PySequenceMethods*)NULL, /* tp_as_sequence */
    (PyMappingMethods*)NULL,   /* tp_as_mapping */
    (hashfunc)NULL,             /* tp_hash */
    (ternaryfunc)NULL,          /* tp_call */
    (reprfunc)NULL,              /* tp_str */
    (getattrofunc)NULL,     /* tp_getattro */
    (setattrofunc)NULL,     /* tp_setattro */
    (PyBufferProcs*)NULL,  /* tp_as_buffer */
    Py_TPFLAGS_DEFAULT,                      /* tp_flags */
    NULL,                        /* Documentation string */
    (traverseproc)NULL,     /* tp_traverse */
    (inquiry)NULL,             /* tp_clear */
    (richcmpfunc)NULL,   /* tp_richcompare */
    0,             /* tp_weaklistoffset */
    (getiterfunc)_wrap_Pystd__set__lt___float___gt____tp_iter,          /* tp_iter */
    (iternextfunc)NULL,     /* tp_iternext */
    (struct PyMethodDef*)NULL, /* tp_methods */
    (struct PyMemberDef*)0,              /* tp_members */
    NULL,                     /* tp_getset */
    NULL,                              /* tp_base */
    NULL,                              /* tp_dict */
    (descrgetfunc)NULL,    /* tp_descr_get */
    (descrsetfunc)NULL,    /* tp_descr_set */
    0,                 /* tp_dictoffset */
    (initproc)_wrap_Pystd__set__lt___float___gt____tp_init,             /* tp_init */
    (allocfunc)PyType_GenericAlloc,           /* tp_alloc */
    (newfunc)PyType_GenericNew,               /* tp_new */
    (freefunc)0,             /* tp_free */
    (inquiry)NULL,             /* tp_is_gc */
    NULL,                              /* tp_bases */
    NULL,                              /* tp_mro */
    NULL,                              /* tp_cache */
    NULL,                              /* tp_subclasses */
    NULL,                              /* tp_weaklist */
    (destructor) NULL                  /* tp_del */
};

PyTypeObject Pystd__set__lt___float___gt__Iter_Type = {
    PyObject_HEAD_INIT(NULL)
    0,                                 /* ob_size */
    (char *) "foo4.Std__set__lt___float___gt__Iter",            /* tp_name */
    sizeof(Pystd__set__lt___float___gt__Iter),                  /* tp_basicsize */
    0,                                 /* tp_itemsize */
    /* methods */
    (destructor)_wrap_Pystd__set__lt___float___gt__Iter__tp_dealloc,        /* tp_dealloc */
    (printfunc)0,                      /* tp_print */
    (getattrfunc)NULL,       /* tp_getattr */
    (setattrfunc)NULL,       /* tp_setattr */
    (cmpfunc)NULL,           /* tp_compare */
    (reprfunc)NULL,             /* tp_repr */
    (PyNumberMethods*)NULL,     /* tp_as_number */
    (PySequenceMethods*)NULL, /* tp_as_sequence */
    (PyMappingMethods*)NULL,   /* tp_as_mapping */
    (hashfunc)NULL,             /* tp_hash */
    (ternaryfunc)NULL,          /* tp_call */
    (reprfunc)NULL,              /* tp_str */
    (getattrofunc)NULL,     /* tp_getattro */
    (setattrofunc)NULL,     /* tp_setattro */
    (PyBufferProcs*)NULL,  /* tp_as_buffer */
    Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC,                      /* tp_flags */
    NULL,                        /* Documentation string */
    (traverseproc)Pystd__set__lt___float___gt__Iter__tp_traverse,     /* tp_traverse */
    (inquiry)Pystd__set__lt___float___gt__Iter__tp_clear,             /* tp_clear */
    (richcmpfunc)NULL,   /* tp_richcompare */
    0,             /* tp_weaklistoffset */
    (getiterfunc)_wrap_Pystd__set__lt___float___gt__Iter__tp_iter,          /* tp_iter */
    (iternextfunc)_wrap_Pystd__set__lt___float___gt__Iter__tp_iternext,     /* tp_iternext */
    (struct PyMethodDef*)NULL, /* tp_methods */
    (struct PyMemberDef*)0,              /* tp_members */
    NULL,                     /* tp_getset */
    NULL,                              /* tp_base */
    NULL,                              /* tp_dict */
    (descrgetfunc)NULL,    /* tp_descr_get */
    (descrsetfunc)NULL,    /* tp_descr_set */
    0,                 /* tp_dictoffset */
    (initproc)NULL,             /* tp_init */
    (allocfunc)PyType_GenericAlloc,           /* tp_alloc */
    (newfunc)PyType_GenericNew,               /* tp_new */
    (freefunc)0,             /* tp_free */
    (inquiry)NULL,             /* tp_is_gc */
    NULL,                              /* tp_bases */
    NULL,                              /* tp_mro */
    NULL,                              /* tp_cache */
    NULL,                              /* tp_subclasses */
    NULL,                              /* tp_weaklist */
    (destructor) NULL                  /* tp_del */
};


/* --- exceptions --- */


PyTypeObject *Pystd__exception_Type;

/* --- enumerations --- */



PyMODINIT_FUNC
#if defined(__GNUC__) && __GNUC__ >= 4
__attribute__ ((visibility("default")))
#endif
initfoo4(void)
{
    PyObject *m;
    PyObject *submodule;
    m = Py_InitModule3((char *) "foo4", foo4_functions, NULL);
    if (m == NULL) {
        return;
    }
    PyFoo__typeid_map.register_wrapper(typeid(Foo), &PyFoo_Type);
    PyFoo__typeid_map.register_wrapper(typeid(Bar), &PyBar_Type);
    PySomeObjectNestedClass__typeid_map.register_wrapper(typeid(SomeObject::NestedClass), &PySomeObjectNestedClass_Type);
    PyZoo__typeid_map.register_wrapper(typeid(Zoo), &PyZoo_Type);
    /* Register the 'AbstractBaseClass' class */
    if (PyType_Ready(&PyAbstractBaseClass_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "AbstractBaseClass", (PyObject *) &PyAbstractBaseClass_Type);
    /* Register the 'AbstractBaseClass2' class */
    if (PyType_Ready(&PyAbstractBaseClass2_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "AbstractBaseClass2", (PyObject *) &PyAbstractBaseClass2_Type);
    /* Register the 'AbstractBaseClassImpl' class */
    PyAbstractBaseClassImpl_Type.tp_base = &PyAbstractBaseClass_Type;
    if (PyType_Ready(&PyAbstractBaseClassImpl_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "AbstractBaseClassImpl", (PyObject *) &PyAbstractBaseClassImpl_Type);
    /* Register the 'AbstractXpto' class */
    if (PyType_Ready(&PyAbstractXpto_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "AbstractXpto", (PyObject *) &PyAbstractXpto_Type);
    /* Register the 'AbstractXptoImpl' class */
    PyAbstractXptoImpl_Type.tp_base = &PyAbstractXpto_Type;
    if (PyType_Ready(&PyAbstractXptoImpl_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "AbstractXptoImpl", (PyObject *) &PyAbstractXptoImpl_Type);
    /* Register the 'Box' class */
    
    PyBoxMeta_Type.tp_base = PyBaseObject_Type.ob_type;
    /* Some fields need to be manually inheritted from the parent metaclass */
    PyBoxMeta_Type.tp_traverse = PyBaseObject_Type.ob_type->tp_traverse;
    PyBoxMeta_Type.tp_clear = PyBaseObject_Type.ob_type->tp_clear;
    PyBoxMeta_Type.tp_is_gc = PyBaseObject_Type.ob_type->tp_is_gc;
    /* PyType tp_setattro is too restrictive */
    PyBoxMeta_Type.tp_setattro = PyObject_GenericSetAttr;
    PyType_Ready(&PyBoxMeta_Type);
    
    PyBox_Type.ob_type = &PyBoxMeta_Type;
    if (PyType_Ready(&PyBox_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Box", (PyObject *) &PyBox_Type);
    /* Register the 'CannotBeConstructed' class */
    if (PyType_Ready(&PyCannotBeConstructed_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "CannotBeConstructed", (PyObject *) &PyCannotBeConstructed_Type);
    /* Register the 'ClassThatTakesFoo' class */
    if (PyType_Ready(&PyClassThatTakesFoo_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "ClassThatTakesFoo", (PyObject *) &PyClassThatTakesFoo_Type);
    /* Register the 'ClassThatThrows' class */
    if (PyType_Ready(&PyClassThatThrows_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "ClassThatThrows", (PyObject *) &PyClassThatThrows_Type);
    /* Register the 'Foo' class */
    
    PyFooMeta_Type.tp_base = PyBaseObject_Type.ob_type;
    /* Some fields need to be manually inheritted from the parent metaclass */
    PyFooMeta_Type.tp_traverse = PyBaseObject_Type.ob_type->tp_traverse;
    PyFooMeta_Type.tp_clear = PyBaseObject_Type.ob_type->tp_clear;
    PyFooMeta_Type.tp_is_gc = PyBaseObject_Type.ob_type->tp_is_gc;
    /* PyType tp_setattro is too restrictive */
    PyFooMeta_Type.tp_setattro = PyObject_GenericSetAttr;
    PyType_Ready(&PyFooMeta_Type);
    
    PyFoo_Type.ob_type = &PyFooMeta_Type;
    if (PyType_Ready(&PyFoo_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Foo", (PyObject *) &PyFoo_Type);
    /* Register the 'Foobar' class */
    
    PyFoobarMeta_Type.tp_base = PyBaseObject_Type.ob_type;
    /* Some fields need to be manually inheritted from the parent metaclass */
    PyFoobarMeta_Type.tp_traverse = PyBaseObject_Type.ob_type->tp_traverse;
    PyFoobarMeta_Type.tp_clear = PyBaseObject_Type.ob_type->tp_clear;
    PyFoobarMeta_Type.tp_is_gc = PyBaseObject_Type.ob_type->tp_is_gc;
    /* PyType tp_setattro is too restrictive */
    PyFoobarMeta_Type.tp_setattro = PyObject_GenericSetAttr;
    PyType_Ready(&PyFoobarMeta_Type);
    
    PyFoobar_Type.ob_type = &PyFoobarMeta_Type;
    if (PyType_Ready(&PyFoobar_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Foobar", (PyObject *) &PyFoobar_Type);
    /* Register the 'InterfaceId' class */
    if (PyType_Ready(&PyInterfaceId_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "InterfaceId", (PyObject *) &PyInterfaceId_Type);
    /* Register the 'Bar' class */
    PyBar_Type.tp_base = &PyFoo_Type;
    if (PyType_Ready(&PyBar_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Bar", (PyObject *) &PyBar_Type);
    /* Register the 'MIRoot' class */
    if (PyType_Ready(&PyMIRoot_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "MIRoot", (PyObject *) &PyMIRoot_Type);
    /* Register the 'ManipulatedObject' class */
    if (PyType_Ready(&PyManipulatedObject_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "ManipulatedObject", (PyObject *) &PyManipulatedObject_Type);
    /* Register the 'MapLike' class */
    if (PyType_Ready(&PyMapLike_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "MapLike", (PyObject *) &PyMapLike_Type);
    /* Register the 'MapLike' class iterator*/
    if (PyType_Ready(&PyMapLike_IterType)) {
        return;
    }
    PyModule_AddObject(m, (char *) "MapLikeIter", (PyObject *) &PyMapLike_IterType);
    /* Register the 'PointerHolder< Zbr >' class */
    if (PyType_Ready(&PyPointerHolder__Zbr_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "PointerHolder__Zbr", (PyObject *) &PyPointerHolder__Zbr_Type);
    /* Register the 'ProtectedConstructor' class */
    if (PyType_Ready(&PyProtectedConstructor_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "ProtectedConstructor", (PyObject *) &PyProtectedConstructor_Type);
    /* Register the 'ReferenceManipulator' class */
    if (PyType_Ready(&PyReferenceManipulator_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "ReferenceManipulator", (PyObject *) &PyReferenceManipulator_Type);
    /* Register the 'SingletonClass' class */
    if (PyType_Ready(&PySingletonClass_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "SingletonClass", (PyObject *) &PySingletonClass_Type);
    /* Register the 'Socket' class */
    if (PyType_Ready(&PySocket_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Socket", (PyObject *) &PySocket_Type);
    /* Register the 'SomeObject' class */
    
    PySomeObjectMeta_Type.tp_base = PyBaseObject_Type.ob_type;
    /* Some fields need to be manually inheritted from the parent metaclass */
    PySomeObjectMeta_Type.tp_traverse = PyBaseObject_Type.ob_type->tp_traverse;
    PySomeObjectMeta_Type.tp_clear = PyBaseObject_Type.ob_type->tp_clear;
    PySomeObjectMeta_Type.tp_is_gc = PyBaseObject_Type.ob_type->tp_is_gc;
    /* PyType tp_setattro is too restrictive */
    PySomeObjectMeta_Type.tp_setattro = PyObject_GenericSetAttr;
    PyType_Ready(&PySomeObjectMeta_Type);
    
    PySomeObject_Type.ob_type = &PySomeObjectMeta_Type;
    if (PyType_Ready(&PySomeObject_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "SomeObject", (PyObject *) &PySomeObject_Type);
    /* Register the 'SomeObject::NestedClass' class */
    
    PySomeObjectNestedClassMeta_Type.tp_base = PyBaseObject_Type.ob_type;
    /* Some fields need to be manually inheritted from the parent metaclass */
    PySomeObjectNestedClassMeta_Type.tp_traverse = PyBaseObject_Type.ob_type->tp_traverse;
    PySomeObjectNestedClassMeta_Type.tp_clear = PyBaseObject_Type.ob_type->tp_clear;
    PySomeObjectNestedClassMeta_Type.tp_is_gc = PyBaseObject_Type.ob_type->tp_is_gc;
    /* PyType tp_setattro is too restrictive */
    PySomeObjectNestedClassMeta_Type.tp_setattro = PyObject_GenericSetAttr;
    PyType_Ready(&PySomeObjectNestedClassMeta_Type);
    
    PySomeObjectNestedClass_Type.ob_type = &PySomeObjectNestedClassMeta_Type;
    if (PyType_Ready(&PySomeObjectNestedClass_Type)) {
        return;
    }
    PyDict_SetItemString((PyObject*) PySomeObject_Type.tp_dict, (char *) "NestedClass", (PyObject *) &PySomeObjectNestedClass_Type);
    /* Register the 'TestContainer' class */
    if (PyType_Ready(&PyTestContainer_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "TestContainer", (PyObject *) &PyTestContainer_Type);
    /* Register the 'Tupl' class */
    if (PyType_Ready(&PyTupl_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Tupl", (PyObject *) &PyTupl_Type);
    /* Register the 'UdpSocket' class */
    PyUdpSocket_Type.tp_base = &PySocket_Type;
    if (PyType_Ready(&PyUdpSocket_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "UdpSocket", (PyObject *) &PyUdpSocket_Type);
    /* Register the 'VectorLike' class */
    if (PyType_Ready(&PyVectorLike_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "VectorLike", (PyObject *) &PyVectorLike_Type);
    /* Register the 'VectorLike2' class */
    if (PyType_Ready(&PyVectorLike2_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "VectorLike2", (PyObject *) &PyVectorLike2_Type);
    /* Register the 'VectorLike2' class iterator*/
    if (PyType_Ready(&PyVectorLike2_IterType)) {
        return;
    }
    PyModule_AddObject(m, (char *) "VectorLike2Iter", (PyObject *) &PyVectorLike2_IterType);
    /* Register the 'Word' class */
    if (PyType_Ready(&PyWord_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Word", (PyObject *) &PyWord_Type);
    /* Register the 'Zbr' class */
    
    PyZbrMeta_Type.tp_base = PyBaseObject_Type.ob_type;
    /* Some fields need to be manually inheritted from the parent metaclass */
    PyZbrMeta_Type.tp_traverse = PyBaseObject_Type.ob_type->tp_traverse;
    PyZbrMeta_Type.tp_clear = PyBaseObject_Type.ob_type->tp_clear;
    PyZbrMeta_Type.tp_is_gc = PyBaseObject_Type.ob_type->tp_is_gc;
    /* PyType tp_setattro is too restrictive */
    PyZbrMeta_Type.tp_setattro = PyObject_GenericSetAttr;
    PyType_Ready(&PyZbrMeta_Type);
    
    PyZbr_Type.ob_type = &PyZbrMeta_Type;
    if (PyType_Ready(&PyZbr_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Zbr", (PyObject *) &PyZbr_Type);
    /* Register the 'Zoo' class */
    if (PyType_Ready(&PyZoo_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Zoo", (PyObject *) &PyZoo_Type);
    /* Register the 'property< std::string >' class */
    if (PyType_Ready(&PyProperty__StdString_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Property__StdString", (PyObject *) &PyProperty__StdString_Type);
    /* Register the 'simple_struct_t' class */
    if (PyType_Ready(&PySimple_struct_t_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "simple_struct_t", (PyObject *) &PySimple_struct_t_Type);
    /* Register the 'MIBase1' class */
    PyMIBase1_Type.tp_base = &PyMIRoot_Type;
    if (PyType_Ready(&PyMIBase1_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "MIBase1", (PyObject *) &PyMIBase1_Type);
    /* Register the 'MIBase2' class */
    PyMIBase2_Type.tp_base = &PyMIRoot_Type;
    if (PyType_Ready(&PyMIBase2_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "MIBase2", (PyObject *) &PyMIBase2_Type);
    /* Register the 'MIMixed' class */
    PyMIMixed_Type.tp_base = &PyMIBase1_Type;
    PyMIMixed_Type.tp_bases = PyTuple_New(2);
        Py_INCREF((PyObject *) &PyMIBase1_Type);
        PyTuple_SET_ITEM(PyMIMixed_Type.tp_bases, 0, (PyObject *) &PyMIBase1_Type);
        Py_INCREF((PyObject *) &PyMIBase2_Type);
        PyTuple_SET_ITEM(PyMIMixed_Type.tp_bases, 1, (PyObject *) &PyMIBase2_Type);
    if (PyType_Ready(&PyMIMixed_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "MIMixed", (PyObject *) &PyMIMixed_Type);
    /* Register the 'std::vector< std::string >' class */
    if (PyType_Ready(&Pystd__vector__lt___std__string___gt___Type)) {
        return;
    }
    if (PyType_Ready(&Pystd__vector__lt___std__string___gt__Iter_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Std__vector__lt___std__string___gt__", (PyObject *) &Pystd__vector__lt___std__string___gt___Type);
    PyModule_AddObject(m, (char *) "Std__vector__lt___std__string___gt__Iter", (PyObject *) &Pystd__vector__lt___std__string___gt__Iter_Type);
    /* Register the 'SimpleStructList' class */
    if (PyType_Ready(&PySimpleStructList_Type)) {
        return;
    }
    if (PyType_Ready(&PySimpleStructListIter_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "SimpleStructList", (PyObject *) &PySimpleStructList_Type);
    PyModule_AddObject(m, (char *) "SimpleStructListIter", (PyObject *) &PySimpleStructListIter_Type);
    /* Register the 'std::vector< simple_struct_t >' class */
    if (PyType_Ready(&Pystd__vector__lt___simple_struct_t___gt___Type)) {
        return;
    }
    if (PyType_Ready(&Pystd__vector__lt___simple_struct_t___gt__Iter_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Std__vector__lt___simple_struct_t___gt__", (PyObject *) &Pystd__vector__lt___simple_struct_t___gt___Type);
    PyModule_AddObject(m, (char *) "Std__vector__lt___simple_struct_t___gt__Iter", (PyObject *) &Pystd__vector__lt___simple_struct_t___gt__Iter_Type);
    /* Register the 'SimpleStructVec' class */
    if (PyType_Ready(&PySimpleStructVec_Type)) {
        return;
    }
    if (PyType_Ready(&PySimpleStructVecIter_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "SimpleStructVec", (PyObject *) &PySimpleStructVec_Type);
    PyModule_AddObject(m, (char *) "SimpleStructVecIter", (PyObject *) &PySimpleStructVecIter_Type);
    /* Register the 'SimpleStructMap' class */
    if (PyType_Ready(&PySimpleStructMap_Type)) {
        return;
    }
    if (PyType_Ready(&PySimpleStructMapIter_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "SimpleStructMap", (PyObject *) &PySimpleStructMap_Type);
    PyModule_AddObject(m, (char *) "SimpleStructMapIter", (PyObject *) &PySimpleStructMapIter_Type);
    /* Register the 'std::map< std::string, int >' class */
    if (PyType_Ready(&Pystd__map__lt___std__string__int___gt___Type)) {
        return;
    }
    if (PyType_Ready(&Pystd__map__lt___std__string__int___gt__Iter_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Std__map__lt___std__string__int___gt__", (PyObject *) &Pystd__map__lt___std__string__int___gt___Type);
    PyModule_AddObject(m, (char *) "Std__map__lt___std__string__int___gt__Iter", (PyObject *) &Pystd__map__lt___std__string__int___gt__Iter_Type);
    /* Register the 'std::set< unsigned int >' class */
    if (PyType_Ready(&Pystd__set__lt___unsigned_int___gt___Type)) {
        return;
    }
    if (PyType_Ready(&Pystd__set__lt___unsigned_int___gt__Iter_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Std__set__lt___unsigned_int___gt__", (PyObject *) &Pystd__set__lt___unsigned_int___gt___Type);
    PyModule_AddObject(m, (char *) "Std__set__lt___unsigned_int___gt__Iter", (PyObject *) &Pystd__set__lt___unsigned_int___gt__Iter_Type);
    /* Register the 'std::set< float >' class */
    if (PyType_Ready(&Pystd__set__lt___float___gt___Type)) {
        return;
    }
    if (PyType_Ready(&Pystd__set__lt___float___gt__Iter_Type)) {
        return;
    }
    PyModule_AddObject(m, (char *) "Std__set__lt___float___gt__", (PyObject *) &Pystd__set__lt___float___gt___Type);
    PyModule_AddObject(m, (char *) "Std__set__lt___float___gt__Iter", (PyObject *) &Pystd__set__lt___float___gt__Iter_Type);
    /* Register the 'std::exception' exception */
    if ((Pystd__exception_Type = (PyTypeObject*) PyErr_NewException((char*)"foo4.exception", NULL, NULL)) == NULL) {
        return;
    }
    Py_INCREF((PyObject *) Pystd__exception_Type);
    PyModule_AddObject(m, (char *) "exception", (PyObject *) Pystd__exception_Type);
    /* Register the 'Error' exception */
    if ((PyError_Type = (PyTypeObject*) PyErr_NewException((char*)"foo4.Error", NULL, NULL)) == NULL) {
        return;
    }
    Py_INCREF((PyObject *) PyError_Type);
    PyModule_AddObject(m, (char *) "Error", (PyObject *) PyError_Type);
    /* Register the 'DomainError' exception */
    if ((PyDomainError_Type = (PyTypeObject*) PyErr_NewException((char*)"foo4.DomainError", (PyObject*) PyError_Type, NULL)) == NULL) {
        return;
    }
    Py_INCREF((PyObject *) PyDomainError_Type);
    PyModule_AddObject(m, (char *) "DomainError", (PyObject *) PyDomainError_Type);
    {
        PyObject *tmp_value;
         // SomeObject::TYPE_FOO
        tmp_value = PyInt_FromLong(SomeObject::TYPE_FOO);
        PyDict_SetItemString((PyObject*) PySomeObject_Type.tp_dict, "TYPE_FOO", tmp_value);
        Py_DECREF(tmp_value);
         // SomeObject::TYPE_BAR
        tmp_value = PyInt_FromLong(SomeObject::TYPE_BAR);
        PyDict_SetItemString((PyObject*) PySomeObject_Type.tp_dict, "TYPE_BAR", tmp_value);
        Py_DECREF(tmp_value);
    }
    {
        PyObject *tmp_value;
         // SomeObject::FOO_TYPE_AAA
        tmp_value = PyInt_FromLong(SomeObject::FOO_TYPE_AAA);
        PyDict_SetItemString((PyObject*) PySomeObject_Type.tp_dict, "FOO_TYPE_AAA", tmp_value);
        Py_DECREF(tmp_value);
         // SomeObject::FOO_TYPE_BBB
        tmp_value = PyInt_FromLong(SomeObject::FOO_TYPE_BBB);
        PyDict_SetItemString((PyObject*) PySomeObject_Type.tp_dict, "FOO_TYPE_BBB", tmp_value);
        Py_DECREF(tmp_value);
         // SomeObject::FOO_TYPE_CCC
        tmp_value = PyInt_FromLong(SomeObject::FOO_TYPE_CCC);
        PyDict_SetItemString((PyObject*) PySomeObject_Type.tp_dict, "FOO_TYPE_CCC", tmp_value);
        Py_DECREF(tmp_value);
    }
    {
        PyObject *tmp_value;
         // SomeObject::CONSTANT_A
        tmp_value = PyInt_FromLong(SomeObject::CONSTANT_A);
        PyDict_SetItemString((PyObject*) PySomeObject_Type.tp_dict, "CONSTANT_A", tmp_value);
        Py_DECREF(tmp_value);
         // SomeObject::CONSTANT_B
        tmp_value = PyInt_FromLong(SomeObject::CONSTANT_B);
        PyDict_SetItemString((PyObject*) PySomeObject_Type.tp_dict, "CONSTANT_B", tmp_value);
        Py_DECREF(tmp_value);
         // SomeObject::CONSTANT_C
        tmp_value = PyInt_FromLong(SomeObject::CONSTANT_C);
        PyDict_SetItemString((PyObject*) PySomeObject_Type.tp_dict, "CONSTANT_C", tmp_value);
        Py_DECREF(tmp_value);
    }
    submodule = initfoo4_TopNs();
    if (submodule == NULL) {
        return;
    }
    Py_INCREF(submodule);
    PyModule_AddObject(m, (char *) "TopNs", submodule);
    submodule = initfoo4_std();
    if (submodule == NULL) {
        return;
    }
    Py_INCREF(submodule);
    PyModule_AddObject(m, (char *) "std", submodule);
    submodule = initfoo4_xpto();
    if (submodule == NULL) {
        return;
    }
    Py_INCREF(submodule);
    PyModule_AddObject(m, (char *) "xpto", submodule);
}
