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

A Service implementation that structures services locally. More...

#include <LocalService.h>

Inheritance diagram for rsb::LocalService:
Inheritance graph
Collaboration diagram for rsb::LocalService:
Collaboration graph

Public Member Functions

 LocalService (const Scope &scope)
virtual ~LocalService ()
std::string getClassName () const
std::set< ParticipantPtrgetParticipants () 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< ParticipantPtrparticipants

Additional Inherited Members

- Protected Member Functions inherited from rsb::Service
 Service (const Scope &scope)
 Constructs a new service with the given scope.

Detailed Description

A Service implementation that structures services locally.

Author
jwienke

Definition at line 41 of file LocalService.h.

Constructor & Destructor Documentation

rsb::LocalService::LocalService ( const Scope scope)

Definition at line 35 of file LocalService.cpp.

rsb::LocalService::~LocalService ( )
virtual

Definition at line 39 of file LocalService.cpp.

Member Function Documentation

void rsb::LocalService::addParticipant ( ParticipantPtr  participant)
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

Implements rsb::Service.

Definition at line 51 of file LocalService.cpp.

References rsb::Participant::getScope(), mutex, and participants.

Here is the call graph for this function:

string rsb::LocalService::getClassName ( ) const

Definition at line 42 of file LocalService.cpp.

set< ParticipantPtr > rsb::LocalService::getParticipants ( ) const
virtual

Returns all participants that reside under this service.

Returns
set of participants of this service

Implements rsb::Service.

Definition at line 46 of file LocalService.cpp.

References mutex, and participants.

void rsb::LocalService::removeParticipant ( ParticipantPtr  participant)
virtual

Removes a previously registered participant from this service.

Parameters
participantparticipant to remove

Implements rsb::Service.

Definition at line 64 of file LocalService.cpp.

References mutex, and participants.

Member Data Documentation

boost::recursive_mutex rsb::LocalService::mutex
mutableprivate

Definition at line 55 of file LocalService.h.

Referenced by addParticipant(), getParticipants(), and removeParticipant().

std::set<ParticipantPtr> rsb::LocalService::participants
private

Definition at line 56 of file LocalService.h.

Referenced by addParticipant(), getParticipants(), and removeParticipant().


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