| 40 | |
| 41 | extern "C" { |
| 42 | static PyObject* Sbk_PathParamFunc_getTable(PyObject* self) |
| 43 | { |
| 44 | PathParamWrapper* cppSelf = 0; |
| 45 | SBK_UNUSED(cppSelf) |
| 46 | if (!Shiboken::Object::isValid(self)) |
| 47 | return 0; |
| 48 | cppSelf = (PathParamWrapper*)((::PathParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PATHPARAM_IDX], (SbkObject*)self)); |
| 49 | PyObject* pyResult = 0; |
| 50 | |
| 51 | // Call function/method |
| 52 | { |
| 53 | |
| 54 | if (!PyErr_Occurred()) { |
| 55 | // getTable(std::list<std::vector<std::string> >*)const |
| 56 | // Begin code injection |
| 57 | |
| 58 | std::list<std::vector<std::string> > table; |
| 59 | cppSelf->getTable(&table); |
| 60 | |
| 61 | std::size_t outListSize = table.size(); |
| 62 | PyObject* outList = PyList_New((int) outListSize); |
| 63 | |
| 64 | std::size_t i = 0; |
| 65 | for (std::list<std::vector<std::string> >::iterator it = table.begin(); it != table.end(); ++it, ++i) { |
| 66 | std::size_t subListSize = it->size(); |
| 67 | PyObject* subList = PyList_New((int) subListSize); |
| 68 | for (std::size_t j = 0; j < subListSize; ++j) { |
| 69 | std::string cppItem = (*it)[j]; |
| 70 | PyList_SET_ITEM(subList, j, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter<std::string>(), &cppItem)); |
| 71 | } |
| 72 | PyList_SET_ITEM(outList, i, subList); |
| 73 | } |
| 74 | |
| 75 | return outList; |
| 76 | |
| 77 | // End of code injection |
| 78 | |
| 79 | |
| 80 | pyResult = Py_None; |
| 81 | Py_INCREF(Py_None); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | if (PyErr_Occurred() || !pyResult) { |
| 86 | Py_XDECREF(pyResult); |
| 87 | return 0; |
| 88 | } |
| 89 | return pyResult; |
| 90 | } |
| 91 | |
| 92 | static PyObject* Sbk_PathParamFunc_setAsMultiPathTable(PyObject* self) |
| 93 | { |