MCPcopy Create free account
hub / github.com/MrKepzie/Natron / Sbk_PathParamFunc_getTable

Function Sbk_PathParamFunc_getTable

Engine/NatronEngine/pathparam_wrapper.cpp:42–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41extern "C" {
42static 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
92static PyObject* Sbk_PathParamFunc_setAsMultiPathTable(PyObject* self)
93{

Callers

nothing calls this directly

Calls 5

isValidFunction · 0.85
getTableMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected