YARP
Yet Another Robot Platform
MessageStack.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_MESSAGESTACK_H
7 #define YARP_OS_MESSAGESTACK_H
8 
9 #include <yarp/os/Portable.h>
10 
11 #include <string>
12 
13 namespace yarp {
14 namespace os {
15 
20 {
21 public:
28  explicit MessageStack(size_t max_threads = 0);
29 
30  MessageStack(const MessageStack&) = delete;
31  MessageStack(MessageStack&&) noexcept = delete;
32  MessageStack& operator=(const MessageStack&) = delete;
33  MessageStack& operator=(MessageStack&&) = delete;
34 
38  virtual ~MessageStack();
39 
43  void attach(PortReader& owner);
44 
52  void stack(PortWriter& msg, const std::string& tag = "");
53 
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
55 private:
56  class Private;
57  Private* mPriv;
58 #endif // DOXYGEN_SHOULD_SKIP_THIS
59 };
60 
61 } // namespace os
62 } // namespace yarp
63 
64 #endif // YARP_OS_MESSAGESTACK_H
Maintain a stack of messages to send asynchronously.
Definition: MessageStack.h:20
MessageStack(MessageStack &&) noexcept=delete
MessageStack(const MessageStack &)=delete
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:25
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:24
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_os_API
Definition: api.h:18