MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / getAllDerived

Method getAllDerived

src/Base/TypePyImp.cpp:157–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157PyObject* TypePy::getAllDerived(PyObject* args) const
158{
159 if (!PyArg_ParseTuple(args, "")) {
160 return nullptr;
161 }
162
163 Base::Type type = Type::fromName(getBaseTypePtr()->getName());
164 std::vector<Base::Type> ary;
165 Type::getAllDerivedFrom(type, ary);
166 Py::List res;
167 for (const auto& it : ary) {
168 res.append(Py::asObject(new TypePy(new Base::Type(it))));
169 }
170 return Py::new_reference_to(res);
171}
172
173namespace
174{

Callers

nothing calls this directly

Calls 3

new_reference_toFunction · 0.85
getNameMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected