RSB
0.7.0
|
A service provides a hierarchical structure for organizing participants. More...
#include <Service.h>
Public Member Functions | |
virtual | ~Service () |
void | printContents (std::ostream &stream) const |
virtual std::set< ParticipantPtr > | getParticipants () const =0 |
Returns all participants that reside under this service. | |
virtual void | addParticipant (ParticipantPtr participant)=0 |
Registers a new participant in this service. | |
virtual void | removeParticipant (ParticipantPtr participant)=0 |
Removes a previously registered participant from this service. | |
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. |
Protected Member Functions | |
Service (const Scope &scope) | |
Constructs a new service with the given scope. | |
Protected Member Functions inherited from rsb::Participant | |
Participant (const Scope &scope, const ParticipantConfig &config) |
Private Attributes | |
Scope | scope |
A service provides a hierarchical structure for organizing participants.
A service forms a parent scope for subordinated participants and sub-services.
Services need to be thread-safe.
|
virtual |
Definition at line 39 of file Service.cpp.
|
protected |
Constructs a new service with the given scope.
scope | scope of the service |
Definition at line 35 of file Service.cpp.
|
pure 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 |
Implemented in rsb::LocalService.
|
pure virtual |
Returns all participants that reside under this service.
Implemented in rsb::LocalService.
Referenced by printContents().
void rsb::Service::printContents | ( | std::ostream & | stream | ) | const |
Reimplemented from rsb::Participant.
Definition at line 42 of file Service.cpp.
References getParticipants().
|
pure virtual |
Removes a previously registered participant from this service.
participant | participant to remove |
Implemented in rsb::LocalService.