YARP  2.3.68+272-20170522.1+git50f0ae7
Yet Another Robot Platform
yarp::os::Route Class Reference

Information about a connection between two ports. More...

#include <yarp/os/Route.h>

Public Member Functions

 Route ()
 Constructor. More...
 
 Route (const ConstString &fromKey, const ConstString &toKey, const ConstString &carrier)
 Create a route. More...
 
 Route (const Route &alt)
 Copy constructor. More...
 
const ConstStringgetFromName () const
 Get the source of the route. More...
 
const ConstStringgetToName () const
 Get the destination of the route. More...
 
const ContactgetToContact () const
 Get the destination contact of the route, if avaiable. More...
 
const ConstStringgetCarrierName () const
 Get the carrier type of the route. More...
 
Route addFromName (const ConstString &fromName) const
 Copy this route with a different source. More...
 
Route addToName (const ConstString &toName) const
 Copy this route with a different destination. More...
 
Route addToContact (const Contact &toContact) const
 Copy this route with a different contact. More...
 
Route addCarrierName (const ConstString &carrierName) const
 Copy this route with a different carrier. More...
 
ConstString toString () const
 Render a text form of the route, "source->carrier->dest". More...
 

Private Attributes

ConstString fromKey
 
ConstString toKey
 
Contact fromContact
 
Contact toContact
 
ConstString carrier
 

Detailed Description

Information about a connection between two ports.

Contains the names of the endpoints, and the name of the carrier in use between them.

Definition at line 25 of file Route.h.

Constructor & Destructor Documentation

◆ Route() [1/3]

yarp::os::Route::Route ( )
inline

Constructor.

Definition at line 32 of file Route.h.

◆ Route() [2/3]

yarp::os::Route::Route ( const ConstString fromKey,
const ConstString toKey,
const ConstString carrier 
)
inline

Create a route.

Parameters
fromKeySource of route.
toKeyDestination of route.
carrierType of carrier.

Definition at line 41 of file Route.h.

◆ Route() [3/3]

yarp::os::Route::Route ( const Route alt)
inline

Copy constructor.

Parameters
altRoute to copy.

Definition at line 54 of file Route.h.

Member Function Documentation

◆ addCarrierName()

Route yarp::os::Route::addCarrierName ( const ConstString carrierName) const
inline

Copy this route with a different carrier.

Parameters
carrierNameThe new carrier of the route.
Returns
the created route.

Definition at line 148 of file Route.h.

◆ addFromName()

Route yarp::os::Route::addFromName ( const ConstString fromName) const
inline

Copy this route with a different source.

Parameters
fromNameThe new source of the route.
Returns
the created route.

Definition at line 109 of file Route.h.

◆ addToContact()

Route yarp::os::Route::addToContact ( const Contact toContact) const
inline

Copy this route with a different contact.

Parameters
toContactnew destination contact of the route.
Returns
the created route.

Definition at line 135 of file Route.h.

◆ addToName()

Route yarp::os::Route::addToName ( const ConstString toName) const
inline

Copy this route with a different destination.

Parameters
toNameThe new destination of the route.
Returns
the created route.

Definition at line 122 of file Route.h.

◆ getCarrierName()

const ConstString& yarp::os::Route::getCarrierName ( ) const
inline

Get the carrier type of the route.

Returns
the carrier type of the route.

Definition at line 98 of file Route.h.

◆ getFromName()

const ConstString& yarp::os::Route::getFromName ( ) const
inline

Get the source of the route.

Returns
the source of the route (a port name)

Definition at line 67 of file Route.h.

◆ getToContact()

const Contact& yarp::os::Route::getToContact ( ) const
inline

Get the destination contact of the route, if avaiable.

Returns
the destination of the route as a contact

Definition at line 88 of file Route.h.

◆ getToName()

const ConstString& yarp::os::Route::getToName ( ) const
inline

Get the destination of the route.

Returns
the destination of the route (a port name)

Definition at line 77 of file Route.h.

◆ toString()

ConstString yarp::os::Route::toString ( ) const
inline

Render a text form of the route, "source->carrier->dest".

Returns
the route in text form.

Definition at line 159 of file Route.h.

Member Data Documentation

◆ carrier

ConstString yarp::os::Route::carrier
private

Definition at line 169 of file Route.h.

◆ fromContact

Contact yarp::os::Route::fromContact
private

Definition at line 167 of file Route.h.

◆ fromKey

ConstString yarp::os::Route::fromKey
private

Definition at line 165 of file Route.h.

◆ toContact

Contact yarp::os::Route::toContact
private

Definition at line 168 of file Route.h.

◆ toKey

ConstString yarp::os::Route::toKey
private

Definition at line 166 of file Route.h.


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