YARP
Yet Another Robot Platform
Route.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef YARP_OS_ROUTE_H
8 #define YARP_OS_ROUTE_H
9 
10 #include <yarp/conf/compiler.h>
11 
12 #include <yarp/os/api.h>
13 
14 #include <string>
15 
16 namespace yarp {
17 namespace os {
18 
19 class Contact;
20 
29 {
30 public:
36  Route();
37 
45  Route(const std::string& fromName,
46  const std::string& toName,
47  const std::string& carrierName);
48 
54  Route(const Route& rhs);
55 
61  Route(Route&& rhs) noexcept;
62 
66  virtual ~Route();
67 
74  Route& operator=(const Route& rhs);
75 
82  Route& operator=(Route&& rhs) noexcept;
83 
92  const std::string& getFromName() const;
93 
99  void setFromName(const std::string& fromName);
100 
109  const std::string& getToName() const;
110 
116  void setToName(const std::string& toName);
117 
126  const Contact& getToContact() const;
127 
133  void setToContact(const Contact& toContact);
134 
143  const std::string& getCarrierName() const;
144 
150  void setCarrierName(const std::string& carrierName);
151 
158  void swapNames();
159 
168  std::string toString() const;
169 
172 #ifndef DOXYGEN_SHOULD_SKIP_THIS
173 private:
174  class Private;
175  Private* mPriv;
176 #endif // DOXYGEN_SHOULD_SKIP_THIS
177 };
178 
179 } // namespace os
180 } // namespace yarp
181 
182 #endif // YARP_OS_ROUTE_H
Represents how to reach a part of a YARP network.
Definition: Contact.h:36
Information about a connection between two ports.
Definition: Route.h:29
std::string toString(const T &value)
convert an arbitrary type to string.
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_os_API
Definition: api.h:18