21 using namespace yarp::os;
26 EventCallback::EventCallback()
40 void Node::attachSensor(
Sensor &sensor)
42 sensors[sensor.
getName()]=&sensor;
49 callbacks[callback.
getName()]=&callback;
54 void Node::addNeighbor(
Node &node)
56 neighbors[node.
getName()]=&node;
61 bool Node::removeNeighbor(
const string &name)
63 map<string,Node*>::iterator it=neighbors.find(name);
64 if (it!=neighbors.end())
75 Node* Node::getNeighbor(
const string &name)
const
77 map<string,Node*>::const_iterator it=neighbors.find(name);
78 return (it!=neighbors.end()?it->second:NULL);
An abstract class that provides basic events handling.
std::string getName() const
Retrieve the node name.
An abstract class that exposes the basic methods for the handling of data acquired through the attach...
std::string getName() const
Retrieve the node name.
An abstract class that exposes the basic methods for sensors handling.
std::string getName() const
Retrieve the sensor name.