MCPcopy Create free account
hub / github.com/Kitware/VTK / Contains

Method Contains

Common/Python/vtkPythonArchiver.cxx:165–180  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

163
164//------------------------------------------------------------------------------
165bool vtkPythonArchiver::Contains(const std::string& relativePath)
166{
167 vtkPythonScopeGilEnsurer gilEnsurer;
168 const char* mname = "Contains";
169 VTK_GET_METHOD(method, this->Object, mname, false)
170
171 PyObject* vtkself = VTKToPython(this);
172 PyObject* pypath = PyUnicode_FromString(relativePath.c_str());
173 vtkSmartPyObject args(PyTuple_Pack(2, vtkself, pypath));
174 Py_DECREF(vtkself);
175 Py_DECREF(pypath);
176
177 vtkSmartPyObject result(PyObject_Call(method, args, nullptr));
178
179 return (CheckResult(mname, result) != 0);
180}
181
182//------------------------------------------------------------------------------
183void vtkPythonArchiver::PrintSelf(ostream& os, vtkIndent indent)

Callers

nothing calls this directly

Calls 3

VTKToPythonFunction · 0.70
CheckResultFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected