Vuo  2.3.2
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 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 VuoProtocolgetProtocol (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...
 

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 76 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 393 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 416 of file VuoProtocol.cc.

◆ getCompositionProtocols() [1/2]

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

Returns the protocols the composition adheres to.

Definition at line 364 of file VuoProtocol.cc.

◆ getCompositionProtocols() [2/2]

vector< VuoProtocol * > VuoProtocol::getCompositionProtocols ( VuoRunner runner)
static

Returns the protocols the composition adheres to.

Definition at line 377 of file VuoProtocol.cc.

◆ getId()

string VuoProtocol::getId ( void  )

Returns the protocol's unique identifier.

Definition at line 85 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 102 of file VuoProtocol.cc.

◆ getName()

string VuoProtocol::getName ( void  )

Returns the name of the protocol.

Definition at line 93 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 111 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 57 of file VuoProtocol.cc.

◆ getProtocols()

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

Returns the available protocols.

Definition at line 26 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 149 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 166 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 119 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 134 of file VuoProtocol.cc.

◆ isCompositionCompliant() [1/2]

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.

◆ isCompositionCompliant() [2/2]

bool VuoProtocol::isCompositionCompliant ( VuoRunner runner)
See also
isCompositionCompliant

Definition at line 316 of file VuoProtocol.cc.

Member Data Documentation

◆ imageFilter

string VuoProtocol::imageFilter = "VuoImageFilter"
static

Processes an existing image.

Definition at line 24 of file VuoProtocol.hh.

◆ imageGenerator

string VuoProtocol::imageGenerator = "VuoImageGenerator"
static

Produces a new image.

Definition at line 25 of file VuoProtocol.hh.

◆ imageTransition

string VuoProtocol::imageTransition = "VuoImageTransition"
static

Transitions between two images.

Definition at line 26 of file VuoProtocol.hh.


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