Vuo  0.4.3
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages

Example: List a composition's published input and output ports.

#include <Vuo/Vuo.h>
int main(void)
// Compile, link, and run the composition
VuoRunner * runner = VuoCompiler::newSeparateProcessRunnerFromCompositionFile(VUO_GRAPH_PATH "/CountWithPublishedPorts.vuo");
// Print a list of the published input and output ports
vector<VuoRunner::Port *> inputs = runner->getPublishedInputPorts();
vector<VuoRunner::Port *> outputs = runner->getPublishedOutputPorts();
printf("Published input ports:\n");
for (vector<VuoRunner::Port *>::iterator i = inputs.begin(); i != inputs.end(); ++i)
printf("\t%s (%s)\n", (*i)->getName().c_str(), (*i)->getType()->getModuleKey().c_str());
printf("Published output ports:\n");
for (vector<VuoRunner::Port *>::iterator i = outputs.begin(); i != outputs.end(); ++i)
printf("\t%s (%s)\n", (*i)->getName().c_str(), (*i)->getType()->getModuleKey().c_str());
return 0;