YARP
Yet Another Robot Platform
Route.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_OS_ROUTE_H
11 #define YARP_OS_ROUTE_H
12 
13 #include <yarp/conf/compiler.h>
14 
15 #include <yarp/os/api.h>
16 
17 #include <string>
18 
19 namespace yarp {
20 namespace os {
21 
22 class Contact;
23 
32 {
33 public:
39  Route();
40 
48  Route(const std::string& fromName,
49  const std::string& toName,
50  const std::string& carrierName);
51 
57  Route(const Route& rhs);
58 
64  Route(Route&& rhs) noexcept;
65 
69  virtual ~Route();
70 
77  Route& operator=(const Route& rhs);
78 
85  Route& operator=(Route&& rhs) noexcept;
86 
95  const std::string& getFromName() const;
96 
102  void setFromName(const std::string& fromName);
103 
112  const std::string& getToName() const;
113 
119  void setToName(const std::string& toName);
120 
129  const Contact& getToContact() const;
130 
136  void setToContact(const Contact& toContact);
137 
146  const std::string& getCarrierName() const;
147 
153  void setCarrierName(const std::string& carrierName);
154 
161  void swapNames();
162 
171  std::string toString() const;
172 
175 #ifndef DOXYGEN_SHOULD_SKIP_THIS
176 private:
177  class Private;
178  Private* mPriv;
179 #endif // DOXYGEN_SHOULD_SKIP_THIS
180 };
181 
182 } // namespace os
183 } // namespace yarp
184 
185 #endif // YARP_OS_ROUTE_H
api.h
YARP_os_API
#define YARP_os_API
Definition: api.h:19
yarp::os::Route
Information about a connection between two ports.
Definition: Route.h:32
compiler.h
toString
std::string toString(const T &value)
convert an arbitrary type to string.
Definition: fakeMotionControl.cpp:121
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::os::Contact
Represents how to reach a part of a YARP network.
Definition: Contact.h:39