YARP
Yet Another Robot Platform
PortWriter.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_PORTWRITER_H
8 #define YARP_OS_PORTWRITER_H
9 
10 #include <yarp/os/api.h>
11 
12 namespace yarp {
13 namespace os {
14 
15 class ConnectionWriter;
16 class Type;
17 
24 {
25 public:
29  virtual ~PortWriter();
30 
42  virtual bool write(ConnectionWriter& writer) const = 0;
43 
47  virtual void onCompletion() const;
48 
55  virtual void onCommencement() const;
56 
57  virtual yarp::os::Type getWriteType() const;
58 };
59 
60 } // namespace os
61 } // namespace yarp
62 
63 #endif // YARP_OS_PORTWRITER_H
An interface for writing to a network connection.
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:24
virtual bool write(ConnectionWriter &writer) const =0
Write this object to a network connection.
virtual ~PortWriter()
Destructor.
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_os_API
Definition: api.h:18