#include <yarp/os/Nodes.h>
Classes | |
class | Private |
Public Member Functions | |
Nodes () | |
virtual | ~Nodes () |
void | add (Contactable &contactable) override |
add a Contactable to the Node specified in the contactable name (see NestedContact.nodeName). | |
void | remove (Contactable &contactable) override |
remove a Contactable from the Node specified in the contactable's name. | |
virtual Contact | query (const std::string &name, const std::string &category="") override |
query the list of Node to find a Contact with the specified name. | |
virtual void | update (Contactable &contactable) |
update a Node information in this container. | |
Contact | getParent (const std::string &name) |
getParent get info about node associated with the specified port. | |
Contact | getURI (const std::string &name) |
getURI queries the Node specified in the name parameter to get Contact information about the specified port | |
void | prepare (const std::string &name) |
prepare checks for the existence of the node specified in the name parameter. | |
void | interrupt () |
interrupt delegates interrupt call to all of the Node in this container. | |
bool | enable (bool flag) |
enable setter for the activity state of the container. | |
void | clear () |
clear empties the container | |
void | setActiveName (const std::string &name) |
setActiveName setter for the currently active node | |
void | addExternalNode (const std::string &name, Node &node) |
addExternalNode adds a Node to this container. | |
void | removeExternalNode (const std::string &name) |
removeExternalNode erase the node from the container. | |
std::string | getActiveName () |
getActiveName getter for the currently active node's name | |
bool | requireActiveName () |
requireActiveName if there is no active node, creates a temporary one. | |
Public Member Functions inherited from yarp::os::Contactables | |
virtual | ~Contactables () |
The Nodes class.
A container for multiple nodes, keeping information about the currently active node. When a Publisher or a Subscriber is registered, a NestedContact will be created associating the topic to the active Node if present. The active Node is the last instantiated in temporal order. Instantiation of multiple Publisher/Subscriber associated with multiple Node is not thread safe.
|
overridevirtual |
add a Contactable to the Node specified in the contactable name (see NestedContact.nodeName).
If the specified node is in this container, add the contactable to it, otherwise firstly creates the node and add it to this container.
contactable | to be added |
Implements yarp::os::Contactables.
std::string Nodes::getActiveName | ( | ) |
void Nodes::interrupt | ( | ) |
prepare checks for the existence of the node specified in the name parameter.
If the node doesn't exists, creates it. If the name parameter is not representing a NestedContact, does nothing.
name | of a port in the format /topic@/node |
|
overridevirtual |
|
overridevirtual |
remove a Contactable from the Node specified in the contactable's name.
contactable | to be removed |
Implements yarp::os::Contactables.
bool Nodes::requireActiveName | ( | ) |
|
virtual |