RSB
0.7.0
|
A Service implementation that structures services locally. More...
#include <LocalService.h>
Public Member Functions | |
LocalService (const Scope &scope) | |
virtual | ~LocalService () |
std::string | getClassName () const |
std::set< ParticipantPtr > | getParticipants () const |
Returns all participants that reside under this service. | |
void | addParticipant (ParticipantPtr participant) |
Registers a new participant in this service. | |
void | removeParticipant (ParticipantPtr participant) |
Removes a previously registered participant from this service. | |
Public Member Functions inherited from rsb::Service | |
virtual | ~Service () |
void | printContents (std::ostream &stream) const |
Public Member Functions inherited from rsb::Participant | |
virtual | ~Participant () |
rsc::misc::UUID | getId () const |
Returns the unique id of the participant. | |
ScopePtr | getScope () const |
Returns the scope of this participant. | |
ParticipantConfig | getConfig () const |
Returns a copy of the participant's configuration. |
Private Attributes | |
boost::recursive_mutex | mutex |
std::set< ParticipantPtr > | participants |
Additional Inherited Members | |
Protected Member Functions inherited from rsb::Service | |
Service (const Scope &scope) | |
Constructs a new service with the given scope. |
A Service implementation that structures services locally.
Definition at line 41 of file LocalService.h.
rsb::LocalService::LocalService | ( | const Scope & | scope | ) |
Definition at line 35 of file LocalService.cpp.
|
virtual |
Definition at line 39 of file LocalService.cpp.
|
virtual |
Registers a new participant in this service.
participant | participant to register |
std::invalid_argument | participant is not in a sub-scope of the service's scope |
Implements rsb::Service.
Definition at line 51 of file LocalService.cpp.
References rsb::Participant::getScope(), mutex, and participants.
string rsb::LocalService::getClassName | ( | ) | const |
Definition at line 42 of file LocalService.cpp.
|
virtual |
Returns all participants that reside under this service.
Implements rsb::Service.
Definition at line 46 of file LocalService.cpp.
References mutex, and participants.
|
virtual |
Removes a previously registered participant from this service.
participant | participant to remove |
Implements rsb::Service.
Definition at line 64 of file LocalService.cpp.
References mutex, and participants.
|
mutableprivate |
Definition at line 55 of file LocalService.h.
Referenced by addParticipant(), getParticipants(), and removeParticipant().
|
private |
Definition at line 56 of file LocalService.h.
Referenced by addParticipant(), getParticipants(), and removeParticipant().