| 155 | } |
| 156 | |
| 157 | PyObject* 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 | |
| 173 | namespace |
| 174 | { |
nothing calls this directly
no test coverage detected