Vuo 2.4.4
Loading...
Searching...
No Matches
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.

Definition at line 16 of file VuoProtocol.hh.

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 available protocols.
 
static VuoProtocolgetProtocol (string id)
 Returns the protocol with the specified unique identifier, or NULL if none matches.
 
static vector< VuoProtocol * > getCompositionProtocols (string compositionAsString)
 Returns the protocols the composition adheres to.
 
static vector< VuoProtocol * > getCompositionProtocols (const vector< pair< string, string > > &publishedInputNamesAndTypes, const vector< pair< string, string > > &publishedOutputNamesAndTypes)
 Returns the protocols that a composition with the given published port names and types adheres to.
 

Static Public Attributes

static string imageFilter = "VuoImageFilter"
 Processes an existing image.
 
static string imageGenerator = "VuoImageGenerator"
 Produces a new image.
 
static string imageTransition = "VuoImageTransition"
 Transitions between two images.
 

Constructor & Destructor Documentation

◆ VuoProtocol()

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.

Definition at line 75 of file VuoProtocol.cc.

Member Function Documentation

◆ addInputPort()

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.

Definition at line 339 of file VuoProtocol.cc.

◆ addOutputPort()

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.

Definition at line 362 of file VuoProtocol.cc.

◆ getCompositionProtocols() [1/2]

vector< VuoProtocol * > VuoProtocol::getCompositionProtocols ( const vector< pair< string, string > > &  publishedInputNamesAndTypes,
const vector< pair< string, string > > &  publishedOutputNamesAndTypes 
)
static

Returns the protocols that a composition with the given published port names and types adheres to.

Definition at line 322 of file VuoProtocol.cc.

◆ getCompositionProtocols() [2/2]

vector< VuoProtocol * > VuoProtocol::getCompositionProtocols ( string  compositionAsString)
static

Returns the protocols the composition adheres to.

Definition at line 309 of file VuoProtocol.cc.

◆ getId()

string VuoProtocol::getId ( void  )

Returns the protocol's unique identifier.

Definition at line 84 of file VuoProtocol.cc.

◆ getInputPortNamesAndTypes()

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 101 of file VuoProtocol.cc.

◆ getName()

string VuoProtocol::getName ( void  )

Returns the name of the protocol.

Definition at line 92 of file VuoProtocol.cc.

◆ getOutputPortNamesAndTypes()

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 110 of file VuoProtocol.cc.

◆ getProtocol()

VuoProtocol * VuoProtocol::getProtocol ( string  id)
static

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

Definition at line 56 of file VuoProtocol.cc.

◆ getProtocols()

vector< VuoProtocol * > VuoProtocol::getProtocols ( void  )
static

Returns the available protocols.

Definition at line 25 of file VuoProtocol.cc.

◆ getTypeForInputPort()

string VuoProtocol::getTypeForInputPort ( string  portName)

Returns the type associated with the input port that has the provided portName.

Definition at line 148 of file VuoProtocol.cc.

◆ getTypeForOutputPort()

string VuoProtocol::getTypeForOutputPort ( string  portName)

Returns the type associated with the output port that has the provided portName.

Definition at line 165 of file VuoProtocol.cc.

◆ hasInputPort()

bool VuoProtocol::hasInputPort ( string  portName)

Returns a boolean indicating whether the protocol has an input port with the provided portName.

Definition at line 118 of file VuoProtocol.cc.

◆ hasOutputPort()

bool VuoProtocol::hasOutputPort ( string  portName)

Returns a boolean indicating whether the protocol has an output port with the provided portName.

Definition at line 133 of file VuoProtocol.cc.

◆ isCompositionCompliant()

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 187 of file VuoProtocol.cc.

Member Data Documentation

◆ imageFilter

string VuoProtocol::imageFilter = "VuoImageFilter"
static

Processes an existing image.

Definition at line 22 of file VuoProtocol.hh.

◆ imageGenerator

string VuoProtocol::imageGenerator = "VuoImageGenerator"
static

Produces a new image.

Definition at line 23 of file VuoProtocol.hh.

◆ imageTransition

string VuoProtocol::imageTransition = "VuoImageTransition"
static

Transitions between two images.

Definition at line 24 of file VuoProtocol.hh.


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