35 LocalService::LocalService(
const Scope& scope) :
43 return "LocalService";
47 boost::recursive_mutex::scoped_lock lock(
mutex);
52 if (!participant->getScope()->isSubScopeOf(*
getScope())) {
54 s <<
"Cannot add Participant " << *participant <<
" with scope "
55 << participant->getScope() <<
" to this service with scope "
57 <<
" because the participant is not in a sub-scope.";
58 throw invalid_argument(s.str());
60 boost::recursive_mutex::scoped_lock lock(
mutex);
65 boost::recursive_mutex::scoped_lock lock(
mutex);
boost::recursive_mutex mutex
A service provides a hierarchical structure for organizing participants.
std::set< ParticipantPtr > participants
void addParticipant(ParticipantPtr participant)
Registers a new participant in this service.
std::string getClassName() const
void removeParticipant(ParticipantPtr participant)
Removes a previously registered participant from this service.
boost::shared_ptr< Participant > ParticipantPtr
ScopePtr getScope() const
Returns the scope of this participant.
Scope is a descriptor for a hierarchical channel of the unified bus.
std::set< ParticipantPtr > getParticipants() const
Returns all participants that reside under this service.