RSB
0.7.0
|
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. | |
virtual | ~Transport () |
std::string | getName () const |
Returns the name of this transport description. | |
ConverterNames | getConverters () const |
rsc::runtime::Properties | getOptions () const |
Returns the specified options for the transport. | |
rsc::runtime::Properties & | mutableOptions () |
Returns the options for the transport. | |
void | setOptions (const rsc::runtime::Properties &options) |
Sets the options for the transport. | |
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 51 of file ParticipantConfig.cpp.
References setEnabled().
|
virtual |
Definition at line 63 of file ParticipantConfig.cpp.
string rsb::ParticipantConfig::Transport::getClassName | ( | ) | const |
Definition at line 132 of file ParticipantConfig.cpp.
ParticipantConfig::Transport::ConverterNames rsb::ParticipantConfig::Transport::getConverters | ( | ) | const |
Definition at line 70 of file ParticipantConfig.cpp.
string rsb::ParticipantConfig::Transport::getName | ( | ) | const |
Returns the name of this transport description.
Definition at line 66 of file ParticipantConfig.cpp.
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 74 of file ParticipantConfig.cpp.
References rsb::ParticipantConfig::options.
void rsb::ParticipantConfig::Transport::handleOption | ( | const std::vector< std::string > & | key, |
const std::string & | value | ||
) |
Definition at line 97 of file ParticipantConfig.cpp.
References rsb::ParticipantConfig::options.
Referenced by rsb::ParticipantConfig::handleOption().
bool rsb::ParticipantConfig::Transport::isEnabled | ( | ) | const |
Definition at line 87 of file ParticipantConfig.cpp.
References rsb::ParticipantConfig::getOptions().
rsc::runtime::Properties & rsb::ParticipantConfig::Transport::mutableOptions | ( | ) |
Returns the options for the transport.
Definition at line 78 of file ParticipantConfig.cpp.
References rsb::ParticipantConfig::options.
bool rsb::ParticipantConfig::Transport::operator< | ( | const Transport & | other | ) | const |
Definition at line 128 of file ParticipantConfig.cpp.
References name.
bool rsb::ParticipantConfig::Transport::operator== | ( | const Transport & | other | ) | const |
Definition at line 124 of file ParticipantConfig.cpp.
References name.
void rsb::ParticipantConfig::Transport::printContents | ( | std::ostream & | stream | ) | const |
Definition at line 136 of file ParticipantConfig.cpp.
References rsb::ParticipantConfig::options.
void rsb::ParticipantConfig::Transport::setEnabled | ( | bool | value | ) |
Definition at line 91 of file ParticipantConfig.cpp.
References rsb::ParticipantConfig::getOptions(), rsb::ParticipantConfig::options, and rsb::ParticipantConfig::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 83 of file ParticipantConfig.cpp.
References rsb::ParticipantConfig::options.
|
private |
Definition at line 134 of file ParticipantConfig.h.
|
private |
Definition at line 133 of file ParticipantConfig.h.
Referenced by operator<(), and operator==().
|
private |
Definition at line 135 of file ParticipantConfig.h.