Vuo
1.1.1
|
This class represents a driver for a protocol.
Public Member Functions | |
VuoCompilerDriver (VuoCompiler *compiler, const string &driverAsCompositionString) | |
Creates a driver. | |
bool | isValidDriverForProtocol (VuoProtocol *protocol) |
Returns a boolean indicating whether this driver is valid for the provided protocol . | |
void | applyToComposition (VuoCompilerComposition *composition) |
Applies this driver to the provided composition . | |
VuoCompilerDriver::VuoCompilerDriver | ( | VuoCompiler * | compiler, |
const string & | driverAsCompositionString | ||
) |
Creates a driver.
compiler | The compiler to use for looking up node classes. |
driverAsCompositionString | The serialized driver, in the form of .vuo composition Graphviz source. |
void VuoCompilerDriver::applyToComposition | ( | VuoCompilerComposition * | composition | ) |
Applies this driver to the provided composition
.
Bridges the driver with the composition by matching published output ports within the driver to identically named and typed published input ports within the composition, and vice versa, and re-routing their connected cables appropriately.
bool VuoCompilerDriver::isValidDriverForProtocol | ( | VuoProtocol * | protocol | ) |
Returns a boolean indicating whether this driver is valid for the provided protocol
.
A driver is valid for a given protocol if, for each of the driver's published outputs, the protocol has a published input with the same name and type, and for each of the driver's published inputs, the protocol has a published output with the same name and type. The protocol may have additional published inputs and outputs and still be compatible with the driver.