Vuo  0.8.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
VuoProtocol Class Reference

Description

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.
 
string getId (void)
 Returns the protocol's unique identifier.
 
string getName (void)
 Returns the name of the protocol.
 
vector< pair< string, string > > getInputPortNamesAndTypes (void)
 Returns an ordered list of the published input port names associated with this protocol, along with their types.
 
vector< pair< string, string > > getOutputPortNamesAndTypes (void)
 Returns an ordered list of the published output port names associated with this protocol, along with their types.
 
bool hasInputPort (string portName)
 Returns a boolean indicating whether the protocol has an input port with the provided portName.
 
bool hasOutputPort (string portName)
 Returns a boolean indicating whether the protocol has an output port with the provided portName.
 
string getTypeForInputPort (string portName)
 Returns the type associated with the input port that has the provided portName.
 
string getTypeForOutputPort (string portName)
 Returns the type associated with the output port that has the provided portName.
 
void addInputPort (string portName, string portType)
 Adds a published input port to the protocol.
 
void addOutputPort (string portName, string portType)
 Adds a published output port to the protocol.
 
bool isCompositionCompliant (string compositionAsString)
 Returns true if this composition complies with this protocol.
 

Static Public Member Functions

static vector< VuoProtocol * > getProtocols (void)
 Returns the avaiable protocols.
 
static VuoProtocolgetProtocol (string id)
 Returns the protocol with the specified unique identifier, or NULL if none matches.
 

Static Public Attributes

static string imageFilter = "VuoImageFilter"
 Processes an existing image.
 
static string imageGenerator = "VuoImageGenerator"
 Produces a new image.
 

Constructor & Destructor Documentation

VuoProtocol::VuoProtocol ( string  id,
string  protocolName 
)

Creates a protocol.

Parameters
idThe protocol's unique identifier. E.g., VuoImageFilter.
protocolNameThe name of the protocol, for display purposes.

Member Function Documentation

void VuoProtocol::addInputPort ( string  portName,
string  portType 
)

Adds a published input port to the protocol.

Parameters
portNameThe name of the input port.
portTypeThe type of the input port.
void VuoProtocol::addOutputPort ( string  portName,
string  portType 
)

Adds a published output port to the protocol.

Parameters
portNameThe name of the output port.
portTypeThe 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.

VuoProtocol * VuoProtocol::getProtocol ( string  id)
static

Returns the protocol with the specified unique identifier, or NULL if none matches.

vector< VuoProtocol * > VuoProtocol::getProtocols ( void  )
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.

Member Data Documentation

string VuoProtocol::imageFilter = "VuoImageFilter"
static

Processes an existing image.

string VuoProtocol::imageGenerator = "VuoImageGenerator"
static

Produces a new image.


The documentation for this class was generated from the following files: