#include <node.hpp>
All nodes self-register as part of the all-nodes database.
virtual bool CanPublish |
( |
| ) |
const |
|
virtual |
Can a node send notifications? By default they can; later subclasses may not be able to.
Reimplemented in TopicSink.
virtual bool CanSubscribe |
( |
| ) |
const |
|
virtual |
Can a node receive notifications? By default they can; later subclasses may not be able to.
Reimplemented in TopicSource.
virtual bool CanSubscribeTo |
( |
const Node & |
| ) |
|
|
virtual |
Is this node interested in receiving notifications from another topic?
Reimplemented in Topic.
virtual void Initialize |
( |
| ) |
|
|
virtual |
Call this function immediately after creating a node (or any of the children of the node class.) This function currently registers the node as part of the list of subscriber nodes, if this node may in fact subscribe. If this node is capable of subscribing at all, then this function registers this node as a possible subscriber. Doing this helps to keep down the number of nodes we search, when we are determining which nodes a new node might subscribe to. We have to do this registration as a second step, after the node is completely initialized, as subscriberness is determined late in initialization.
Reimplemented in TopicSink, and Socket.
virtual bool IsTopic |
( |
| ) |
const |
|
virtual |
In order to avoid bringing in a bunch of RTTI stuff, we permit nodes to be asked whether they're topics or not
Reimplemented in TopicSink, and Topic.
virtual bool PublishTo |
( |
Node & |
subscriber | ) |
|
|
virtual |
Causes this node to begin publishing events to the given subscriber.
- Parameters
-
subscriber | The node to receive published events |
- Returns
- true if the request was successful, false if the subscriber was already subscribed
Reimplemented in TopicSink, and Topic.
Causes this node to attempt to publish to some other nodes.
virtual bool SubscribeTo |
( |
Node & |
publisher | ) |
|
|
virtual |
Causes this node to start receiving events from the given publisher.
- Parameters
-
publisher | The node to start receiving events from |
- Returns
- true if successful, false if the publisher was already subscribed
Reimplemented in TopicSource.
Causes this node to attempt to subscribe to some other nodes.
virtual bool UnpublishTo |
( |
Node & |
subscriber | ) |
|
|
virtual |
Causes this node to stop publishing events to this subscriber.
- Parameters
-
subscriber | The node to stop receiving events |
- Returns
- true if successful, false if the subscriber was not being published to in the first place
Reimplemented in TopicSink.
Causes this node to attempt to unpublish to some other nodes.
virtual bool UnsubscribeTo |
( |
Node & |
publisher | ) |
|
|
virtual |
Causes this node to unsubscribe from the given publisher's events.
- Parameters
-
publisher | The publisher to unsubscribe from |
- Returns
- true if successful, false if the node was already unsubscribed
Reimplemented in TopicSource.
Causes this node to attempt to unsubscribe to some other nodes.
A bunch of nodes that this node interested in hearing from.
A pointer to any custom data you need to store for a node.
A pointer to any custom data you need to store for a node.
A bunch of nodes that are interested in what this node has to report.
The documentation for this class was generated from the following file: