RSB  0.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::Service Class Reference

A service provides a hierarchical structure for organizing participants. More...

#include <Service.h>

Inheritance diagram for rsb::Service:
Inheritance graph
Collaboration diagram for rsb::Service:
Collaboration graph

Public Member Functions

virtual ~Service ()
void printContents (std::ostream &stream) const
virtual std::set< ParticipantPtrgetParticipants () 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

Detailed Description

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.

Author
jwienke

Definition at line 54 of file Service.h.

Constructor & Destructor Documentation

rsb::Service::~Service ( )
virtual

Definition at line 39 of file Service.cpp.

rsb::Service::Service ( const Scope scope)
protected

Constructs a new service with the given scope.

Parameters
scopescope of the service

Definition at line 35 of file Service.cpp.

Member Function Documentation

virtual void rsb::Service::addParticipant ( ParticipantPtr  participant)
pure virtual

Registers a new participant in this service.

Parameters
participantparticipant to register
Exceptions
std::invalid_argumentparticipant is not in a sub-scope of the service's scope

Implemented in rsb::LocalService.

virtual std::set<ParticipantPtr> rsb::Service::getParticipants ( ) const
pure virtual

Returns all participants that reside under this service.

Returns
set of participants of this service

Implemented in rsb::LocalService.

Referenced by printContents().

Here is the caller graph for this function:

void rsb::Service::printContents ( std::ostream &  stream) const

Reimplemented from rsb::Participant.

Definition at line 42 of file Service.cpp.

References getParticipants().

Here is the call graph for this function:

virtual void rsb::Service::removeParticipant ( ParticipantPtr  participant)
pure virtual

Removes a previously registered participant from this service.

Parameters
participantparticipant to remove

Implemented in rsb::LocalService.

Member Data Documentation

Scope rsb::Service::scope
private

Definition at line 95 of file Service.h.


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