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

Method hasSink

src/python/pystreamingalgorithm.cpp:154–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154PyObject* PyStreamingAlgorithm::hasSink(PyStreamingAlgorithm* self, PyObject* obj) {
155 char* name = PyString_AsString(obj);
156 if (name == NULL) {
157 PyErr_SetString(PyExc_ValueError, "Algorithm.hasSink requires 1 string argument");
158 return NULL;
159 }
160
161 bool result = contains(self->algo->inputs(), name);
162 return toPython((void*)&result, BOOL);
163}
164
165PyObject* PyStreamingAlgorithm::hasSource(PyStreamingAlgorithm* self, PyObject* obj) {
166 char* name = PyString_AsString(obj);

Callers

nothing calls this directly

Calls 2

containsFunction · 0.85
toPythonFunction · 0.85

Tested by

no test coverage detected