MCPcopy Create free account
hub / github.com/MTG/essentia / hasSource

Method hasSource

src/python/pystreamingalgorithm.cpp:165–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165PyObject* PyStreamingAlgorithm::hasSource(PyStreamingAlgorithm* self, PyObject* obj) {
166 char* name = PyString_AsString(obj);
167 if (name == NULL) {
168 PyErr_SetString(PyExc_ValueError, "Algorithm.hasSource requires 1 string argument");
169 return NULL;
170 }
171
172 bool result = contains(self->algo->outputs(), name);
173 return toPython((void*)&result, BOOL);
174}
175
176
177PyObject* PyStreamingAlgorithm::push(PyStreamingAlgorithm* self, PyObject* args) {

Callers

nothing calls this directly

Calls 2

containsFunction · 0.85
toPythonFunction · 0.85

Tested by

no test coverage detected