YARP
Yet Another Robot Platform
Nodes.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef YARP_OS_NODES_H
7 #define YARP_OS_NODES_H
8 
9 #include <yarp/os/Contactables.h>
10 
11 // forward declarations:
12 namespace yarp {
13 namespace os {
14 class Node;
15 } // namespace os
16 } // namespace yarp
17 
18 namespace yarp {
19 namespace os {
20 
32 {
33 public:
34  Nodes();
35  virtual ~Nodes();
36 
44  void add(Contactable& contactable) override;
45 
50  void remove(Contactable& contactable) override;
51 
58  virtual Contact query(const std::string& name,
59  const std::string& category = "") override;
60 
65  virtual void update(Contactable& contactable);
66 
73  Contact getParent(const std::string& name);
74 
81  Contact getURI(const std::string& name);
82 
89  void prepare(const std::string& name);
90 
94  void interrupt();
95 
102  bool enable(bool flag);
103 
107  void clear();
108 
113  void setActiveName(const std::string& name);
114 
121  void addExternalNode(const std::string& name, Node& node);
122 
127  void removeExternalNode(const std::string& name);
128 
133  std::string getActiveName();
134 
139  bool requireActiveName();
140 
141 #ifndef DOXYGEN_SHOULD_SKIP_THIS
142 private:
143  class Private;
144  Private* mPriv;
145 #endif // DOXYGEN_SHOULD_SKIP_THIS
146 };
147 
148 } // namespace os
149 } // namespace yarp
150 
151 
152 #endif // YARP_OS_NODES_H
Represents how to reach a part of a YARP network.
Definition: Contact.h:36
An abstract port.
Definition: Contactable.h:35
The yarp::os::Contactables class.
Definition: Contactables.h:21
The Node class.
Definition: Node.h:24
The Nodes class.
Definition: Nodes.h:32
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_os_API
Definition: api.h:18