This class represents a protocol.
A protocol consists of an ordered list of published port names and their associated types.
Definition at line 18 of file VuoProtocol.hh.
Public Member Functions | |
VuoProtocol (string id, string protocolName) | |
Creates a protocol. More... | |
string | getId (void) |
Returns the protocol's unique identifier. More... | |
string | getName (void) |
Returns the name of the protocol. More... | |
vector< pair< string, string > > | getInputPortNamesAndTypes (void) |
Returns an ordered list of the published input port names associated with this protocol, along with their types. More... | |
vector< pair< string, string > > | getOutputPortNamesAndTypes (void) |
Returns an ordered list of the published output port names associated with this protocol, along with their types. More... | |
bool | hasInputPort (string portName) |
Returns a boolean indicating whether the protocol has an input port with the provided portName . More... | |
bool | hasOutputPort (string portName) |
Returns a boolean indicating whether the protocol has an output port with the provided portName . More... | |
string | getTypeForInputPort (string portName) |
Returns the type associated with the input port that has the provided portName . More... | |
string | getTypeForOutputPort (string portName) |
Returns the type associated with the output port that has the provided portName . More... | |
void | addInputPort (string portName, string portType) |
Adds a published input port to the protocol. More... | |
void | addOutputPort (string portName, string portType) |
Adds a published output port to the protocol. More... | |
bool | isCompositionCompliant (string compositionAsString) |
Returns true if this composition complies with this protocol. More... | |
bool | isCompositionCompliant (VuoRunner *runner) |
Static Public Member Functions | |
static vector< VuoProtocol * > | getProtocols (void) |
Returns the available protocols. More... | |
static VuoProtocol * | getProtocol (string id) |
Returns the protocol with the specified unique identifier, or NULL if none matches. More... | |
static vector< VuoProtocol * > | getCompositionProtocols (string compositionAsString) |
Returns the protocols the composition adheres to. More... | |
static vector< VuoProtocol * > | getCompositionProtocols (VuoRunner *runner) |
Returns the protocols the composition adheres to. More... | |
Static Public Attributes | |
static string | imageFilter = "VuoImageFilter" |
Processes an existing image. More... | |
static string | imageGenerator = "VuoImageGenerator" |
Produces a new image. More... | |
static string | imageTransition = "VuoImageTransition" |
Transitions between two images. More... | |
VuoProtocol::VuoProtocol | ( | string | id, |
string | protocolName | ||
) |
Creates a protocol.
id | The protocol's unique identifier. E.g., VuoImageFilter . |
protocolName | The name of the protocol, for display purposes. |
Definition at line 76 of file VuoProtocol.cc.
void VuoProtocol::addInputPort | ( | string | portName, |
string | portType | ||
) |
Adds a published input port to the protocol.
portName | The name of the input port. |
portType | The type of the input port. |
Definition at line 393 of file VuoProtocol.cc.
void VuoProtocol::addOutputPort | ( | string | portName, |
string | portType | ||
) |
Adds a published output port to the protocol.
portName | The name of the output port. |
portType | The type of the output port. |
Definition at line 416 of file VuoProtocol.cc.
|
static |
Returns the protocols the composition adheres to.
Definition at line 364 of file VuoProtocol.cc.
|
static |
Returns the protocols the composition adheres to.
Definition at line 377 of file VuoProtocol.cc.
string VuoProtocol::getId | ( | void | ) |
Returns the protocol's unique identifier.
Definition at line 85 of file VuoProtocol.cc.
vector< pair< string, string > > VuoProtocol::getInputPortNamesAndTypes | ( | void | ) |
Returns an ordered list of the published input port names associated with this protocol, along with their types.
Definition at line 102 of file VuoProtocol.cc.
string VuoProtocol::getName | ( | void | ) |
Returns the name of the protocol.
Definition at line 93 of file VuoProtocol.cc.
vector< pair< string, string > > VuoProtocol::getOutputPortNamesAndTypes | ( | void | ) |
Returns an ordered list of the published output port names associated with this protocol, along with their types.
Definition at line 111 of file VuoProtocol.cc.
|
static |
Returns the protocol with the specified unique identifier, or NULL if none matches.
Definition at line 57 of file VuoProtocol.cc.
|
static |
Returns the available protocols.
Definition at line 26 of file VuoProtocol.cc.
string VuoProtocol::getTypeForInputPort | ( | string | portName | ) |
Returns the type associated with the input port that has the provided portName
.
Definition at line 149 of file VuoProtocol.cc.
string VuoProtocol::getTypeForOutputPort | ( | string | portName | ) |
Returns the type associated with the output port that has the provided portName
.
Definition at line 166 of file VuoProtocol.cc.
bool VuoProtocol::hasInputPort | ( | string | portName | ) |
Returns a boolean indicating whether the protocol has an input port with the provided portName
.
Definition at line 119 of file VuoProtocol.cc.
bool VuoProtocol::hasOutputPort | ( | string | portName | ) |
Returns a boolean indicating whether the protocol has an output port with the provided portName
.
Definition at line 134 of file VuoProtocol.cc.
bool VuoProtocol::isCompositionCompliant | ( | string | compositionAsString | ) |
Returns true if this composition complies with this protocol.
A composition complies with a given protocol if, for each port specified in the protocol, the composition contains a published port with a matching name and type. The composition may have additional published ports and still comply with the protocol.
Definition at line 188 of file VuoProtocol.cc.
bool VuoProtocol::isCompositionCompliant | ( | VuoRunner * | runner | ) |
Definition at line 316 of file VuoProtocol.cc.
|
static |
Processes an existing image.
Definition at line 24 of file VuoProtocol.hh.
|
static |
Produces a new image.
Definition at line 25 of file VuoProtocol.hh.
|
static |
Transitions between two images.
Definition at line 26 of file VuoProtocol.hh.