YARP  2.3.70.1
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 ()
 Default constructor. More...
 
 Route (const ConstString &fromName, const ConstString &toName, const ConstString &carrierName)
 Create a route. More...
 
 Route (const Route &rhs)
 Copy constructor. More...
 
virtual ~Route ()
 Destructor. More...
 
Routeoperator= (const Route &rhs)
 Copy assignment operator. More...
 
const ConstStringgetFromName () const
 Get the source of the route. More...
 
void setFromName (const ConstString &fromName)
 Set the source of the route. More...
 
const ConstStringgetToName () const
 Get the destination of the route. More...
 
void setToName (const ConstString &toName)
 Set the destination of the route. More...
 
const ContactgetToContact () const
 Get the destination contact of the route, if avaiable. More...
 
void setToContact (const Contact &toContact)
 Set the destination contact of the route. More...
 
const ConstStringgetCarrierName () const
 Get the carrier type of the route. More...
 
void setCarrierName (const ConstString &carrierName)
 Set the carrier type of the route. More...
 
void swapNames ()
 Swap from and to names. More...
 
ConstString toString () const
 Render a text form of the route, "source->carrier->dest". 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...
 

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 32 of file Route.h.

Constructor & Destructor Documentation

◆ Route() [1/3]

Route::Route ( )

Default constructor.

Definition at line 46 of file Route.cpp.

◆ Route() [2/3]

Route::Route ( const ConstString fromName,
const ConstString toName,
const ConstString carrierName 
)

Create a route.

Parameters
fromNameSource of route.
toNameDestination of route.
carrierType of carrier.

Definition at line 54 of file Route.cpp.

◆ Route() [3/3]

Route::Route ( const Route rhs)

Copy constructor.

Parameters
rhsRoute to copy.

Definition at line 64 of file Route.cpp.

◆ ~Route()

Route::~Route ( )
virtual

Destructor.

Definition at line 76 of file Route.cpp.

Member Function Documentation

◆ addCarrierName()

Route Route::addCarrierName ( const ConstString carrierName) const

Copy this route with a different carrier.

Parameters
carrierNameThe new carrier of the route.
Returns
the created route.
Deprecated:
since YARP 2.3.70

Definition at line 173 of file Route.cpp.

◆ addFromName()

Route Route::addFromName ( const ConstString fromName) const

Copy this route with a different source.

Parameters
fromNameThe new source of the route.
Returns
the created route.
Deprecated:
since YARP 2.3.70

Definition at line 151 of file Route.cpp.

◆ addToContact()

Route Route::addToContact ( const Contact toContact) const

Copy this route with a different contact.

Parameters
toContactnew destination contact of the route.
Returns
the created route.
Deprecated:
since YARP 2.3.70

Definition at line 166 of file Route.cpp.

◆ addToName()

Route Route::addToName ( const ConstString toName) const

Copy this route with a different destination.

Parameters
toNameThe new destination of the route.
Returns
the created route.
Deprecated:
since YARP 2.3.70

Definition at line 158 of file Route.cpp.

◆ getCarrierName()

const ConstString & Route::getCarrierName ( ) const

Get the carrier type of the route.

Returns
the carrier type of the route.

Definition at line 129 of file Route.cpp.

◆ getFromName()

const ConstString & Route::getFromName ( ) const

Get the source of the route.

Returns
the source of the route (a port name)

Definition at line 99 of file Route.cpp.

◆ getToContact()

const Contact & Route::getToContact ( ) const

Get the destination contact of the route, if avaiable.

Returns
the destination of the route as a contact

Definition at line 119 of file Route.cpp.

◆ getToName()

const ConstString & Route::getToName ( ) const

Get the destination of the route.

Returns
the destination of the route (a port name)

Definition at line 109 of file Route.cpp.

◆ operator=()

Route & Route::operator= ( const Route rhs)

Copy assignment operator.

Parameters
rhsthe Route to copy
Returns
this object

Definition at line 81 of file Route.cpp.

◆ setCarrierName()

void Route::setCarrierName ( const ConstString carrierName)

Set the carrier type of the route.

Parameters
carrierNamethe carrier type of the route.

Definition at line 134 of file Route.cpp.

◆ setFromName()

void Route::setFromName ( const ConstString fromName)

Set the source of the route.

Parameters
fromNamethe source of the route (a port name)

Definition at line 104 of file Route.cpp.

◆ setToContact()

void Route::setToContact ( const Contact toContact)

Set the destination contact of the route.

Parameters
toContactthe destination of the route as a contact

Definition at line 124 of file Route.cpp.

◆ setToName()

void Route::setToName ( const ConstString toName)

Set the destination of the route.

Parameters
toNamethe destination of the route (a port name)

Definition at line 114 of file Route.cpp.

◆ swapNames()

void Route::swapNames ( )

Swap from and to names.

Definition at line 139 of file Route.cpp.

◆ toString()

ConstString Route::toString ( ) const

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

Returns
the route in text form.

Definition at line 144 of file Route.cpp.


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