#include <Subscribable.hh>

Public Member Functions | |
| virtual | ~Subscribable () |
| virtual void | checkFederateAccess (FederateHandle, const char *) const =0 |
| virtual Handle | getHandle () const =0 |
| bool | isSubscribed (FederateHandle, const RTIRegion *) const |
| Indicates whether a federate is subscribed with a particular region. | |
| bool | isSubscribed (FederateHandle) const |
| Indicates whether a federate is subscribed with any region. | |
| void | subscribe (FederateHandle, const RTIRegion *) |
| Subscribe a federate with a region. | |
| void | unsubscribe (FederateHandle) |
| Removes a subscribed federate. | |
| void | unsubscribe (FederateHandle, const RTIRegion *) |
| Unsubscribe a federate with a region. | |
| void | addFederatesIfOverlap (ObjectClassBroadcastList &, const RTIRegion *, Handle) const |
| Add federates and associated attribute to a broadcast list. | |
| void | addFederatesIfOverlap (InteractionBroadcastList &, const RTIRegion *) const |
| Add federates to a broadcast list. | |
Private Attributes | |
| std::list< Subscriber > | subscribers |
That is ObjectClassAttribute and Interaction.
Definition at line 61 of file Subscribable.hh.
| ~Subscribable | ( | ) | [virtual] |
Definition at line 97 of file Subscribable.cc.
References certi::D, pdError, and Subscribable::subscribers.
| virtual void checkFederateAccess | ( | FederateHandle | , | |
| const char * | ||||
| ) | const [pure virtual] |
| virtual Handle getHandle | ( | ) | const [pure virtual] |
Implemented in Interaction, and ObjectClassAttribute.
| bool isSubscribed | ( | FederateHandle | fed, | |
| const RTIRegion * | region | |||
| ) | const |
Indicates whether a federate is subscribed with a particular region.
| fed | federate | |
| region | region |
Definition at line 133 of file Subscribable.cc.
References Subscribable::subscribers.
Referenced by Interaction::killFederate(), and Subscribable::subscribe().
| bool isSubscribed | ( | FederateHandle | fed | ) | const |
Indicates whether a federate is subscribed with any region.
| fed | federate |
Definition at line 147 of file Subscribable.cc.
References Subscribable::subscribers.
| void subscribe | ( | FederateHandle | fed, | |
| const RTIRegion * | region | |||
| ) |
Subscribe a federate with a region.
| fed | Federate to subscribe | |
| region | Region to use for subscription (0 for default region) |
Definition at line 160 of file Subscribable.cc.
References Subscribable::checkFederateAccess(), certi::D, Subscribable::isSubscribed(), pdError, and Subscribable::subscribers.
Referenced by ObjectClass::subscribe(), InteractionSet::subscribe(), and Federation::subscribeInteractionWR().

| void unsubscribe | ( | FederateHandle | fed | ) |
Removes a subscribed federate.
All subscription regions are concerned.
| fed | Federate to unsubscribe |
Definition at line 108 of file Subscribable.cc.
References Subscribable::subscribers.
Referenced by Interaction::killFederate(), InteractionSet::subscribe(), and Federation::unsubscribeInteractionWR().
| void unsubscribe | ( | FederateHandle | fed, | |
| const RTIRegion * | region | |||
| ) |
Unsubscribe a federate with a region.
| fed | Federate to unsubscribe | |
| region | Region for unsubscription (other subscriptions may remain) |
Definition at line 121 of file Subscribable.cc.
References Subscribable::subscribers.
| void addFederatesIfOverlap | ( | ObjectClassBroadcastList & | lst, | |
| const RTIRegion * | region, | |||
| Handle | handle | |||
| ) | const |
Add federates and associated attribute to a broadcast list.
| lst | Broadcast list where federates/handles should be added | |
| region | Region to check for overlap | |
| handle | Handle of this object (Subscribable subclass) |
Definition at line 178 of file Subscribable.cc.
References ObjectClassBroadcastList::addFederate(), and Subscribable::subscribers.
Referenced by Interaction::broadcastInteractionMessage(), and ObjectClassAttribute::updateBroadcastList().

| void addFederatesIfOverlap | ( | InteractionBroadcastList & | lst, | |
| const RTIRegion * | region | |||
| ) | const |
Add federates to a broadcast list.
| lst | Broadcast list where federates/handles should be added | |
| region | Region to check for overlap |
Definition at line 193 of file Subscribable.cc.
References InteractionBroadcastList::addFederate(), and Subscribable::subscribers.

std::list<Subscriber> subscribers [private] |
Definition at line 81 of file Subscribable.hh.
Referenced by Subscribable::addFederatesIfOverlap(), Subscribable::isSubscribed(), Subscribable::subscribe(), Subscribable::unsubscribe(), and Subscribable::~Subscribable().
1.5.5