RSB
0.16.1
|
Description of a desired transport. More...
#include <ParticipantConfig.h>
Public Types | |
typedef std::set< std::pair< std::string, std::string > > | ConverterNames |
Public Member Functions | |
Transport (const std::string &name, bool enabled=true) | |
Creates a new transport description for the transport with the given name. More... | |
virtual | ~Transport () |
std::string | getName () const |
Returns the name of this transport description. More... | |
ConverterNames | getConverters () const |
rsc::runtime::Properties | getOptions () const |
Returns the specified options for the transport. More... | |
rsc::runtime::Properties & | mutableOptions () |
Returns the options for the transport. More... | |
void | setOptions (const rsc::runtime::Properties &options) |
Sets the options for the transport. More... | |
bool | isEnabled () const |
void | setEnabled (bool value) |
bool | operator== (const Transport &other) const |
bool | operator< (const Transport &other) const |
std::string | getClassName () const |
void | printContents (std::ostream &stream) const |
void | handleOption (const std::vector< std::string > &key, const std::string &value) |
Private Attributes | |
std::string | name |
ConverterNames | converters |
rsc::runtime::Properties | options |
Description of a desired transport.
Transport configurations are compared by the name of the transport they describe because one transport can exist only once per participant.
Definition at line 72 of file ParticipantConfig.h.
typedef std::set<std::pair<std::string, std::string> > rsb::ParticipantConfig::Transport::ConverterNames |
Definition at line 76 of file ParticipantConfig.h.
|
explicit |
Creates a new transport description for the transport with the given name.
name | name of the transport to describe |
enabled | controls whether the transport is used by default. |
std::invalid_argument | empty name given, a transport cannot have an empty name |
Definition at line 48 of file ParticipantConfig.cpp.
References setEnabled().
|
virtual |
Definition at line 60 of file ParticipantConfig.cpp.
string rsb::ParticipantConfig::Transport::getClassName | ( | ) | const |
Definition at line 129 of file ParticipantConfig.cpp.
ParticipantConfig::Transport::ConverterNames rsb::ParticipantConfig::Transport::getConverters | ( | ) | const |
Definition at line 67 of file ParticipantConfig.cpp.
References converters.
string rsb::ParticipantConfig::Transport::getName | ( | ) | const |
Returns the name of this transport description.
Definition at line 63 of file ParticipantConfig.cpp.
References name.
Referenced by rsb::ParticipantConfig::addTransport(), and rsb::ParticipantConfig::removeTransport().
rsc::runtime::Properties rsb::ParticipantConfig::Transport::getOptions | ( | ) | const |
Returns the specified options for the transport.
Definition at line 71 of file ParticipantConfig.cpp.
References options.
Referenced by isEnabled(), and setEnabled().
void rsb::ParticipantConfig::Transport::handleOption | ( | const std::vector< std::string > & | key, |
const std::string & | value | ||
) |
Definition at line 94 of file ParticipantConfig.cpp.
References converters, and options.
Referenced by rsb::ParticipantConfig::handleOption().
bool rsb::ParticipantConfig::Transport::isEnabled | ( | ) | const |
Definition at line 84 of file ParticipantConfig.cpp.
References getOptions().
rsc::runtime::Properties & rsb::ParticipantConfig::Transport::mutableOptions | ( | ) |
Returns the options for the transport.
Definition at line 75 of file ParticipantConfig.cpp.
References options.
bool rsb::ParticipantConfig::Transport::operator< | ( | const Transport & | other | ) | const |
Definition at line 125 of file ParticipantConfig.cpp.
References name.
bool rsb::ParticipantConfig::Transport::operator== | ( | const Transport & | other | ) | const |
Definition at line 121 of file ParticipantConfig.cpp.
References name.
void rsb::ParticipantConfig::Transport::printContents | ( | std::ostream & | stream | ) | const |
Definition at line 133 of file ParticipantConfig.cpp.
References converters, name, and options.
void rsb::ParticipantConfig::Transport::setEnabled | ( | bool | value | ) |
Definition at line 88 of file ParticipantConfig.cpp.
References getOptions(), options, and setOptions().
Referenced by rsb::Factory::Factory(), and Transport().
void rsb::ParticipantConfig::Transport::setOptions | ( | const rsc::runtime::Properties & | options | ) |
Sets the options for the transport.
options | new options replacing all old ones |
Definition at line 80 of file ParticipantConfig.cpp.
References options.
Referenced by setEnabled().
|
private |
Definition at line 134 of file ParticipantConfig.h.
Referenced by getConverters(), handleOption(), and printContents().
|
private |
Definition at line 133 of file ParticipantConfig.h.
Referenced by getName(), operator<(), operator==(), and printContents().
|
private |
Definition at line 135 of file ParticipantConfig.h.
Referenced by getOptions(), handleOption(), mutableOptions(), printContents(), setEnabled(), and setOptions().