This class represents a protocol.
A protocol consists of an ordered list of published port names and their associated types.
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... | |
Static Public Member Functions | |
static vector< VuoProtocol * > | getProtocols (void) |
Returns the avaiable protocols. More... | |
static VuoProtocol * | getProtocol (string id) |
Returns the protocol with the specified unique identifier, or NULL if none matches. More... | |
Static Public Attributes | |
static string | imageFilter = "VuoImageFilter" |
Processes an existing image. More... | |
static string | imageGenerator = "VuoImageGenerator" |
Produces a new image. 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. |
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. |
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. |
string VuoProtocol::getId | ( | void | ) |
Returns the protocol's unique identifier.
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.
string VuoProtocol::getName | ( | void | ) |
Returns the name of the protocol.
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.
|
static |
Returns the protocol with the specified unique identifier, or NULL if none matches.
|
static |
Returns the avaiable protocols.
string VuoProtocol::getTypeForInputPort | ( | string | portName | ) |
Returns the type associated with the input port that has the provided portName
.
string VuoProtocol::getTypeForOutputPort | ( | string | portName | ) |
Returns the type associated with the output port that has the provided portName
.
bool VuoProtocol::hasInputPort | ( | string | portName | ) |
Returns a boolean indicating whether the protocol has an input port with the provided portName
.
bool VuoProtocol::hasOutputPort | ( | string | portName | ) |
Returns a boolean indicating whether the protocol has an output port with the provided portName
.
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.
|
static |
Processes an existing image.
|
static |
Produces a new image.