YARP
Yet Another Robot Platform
PortWriter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2021 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_PORTWRITER_H
11 #define YARP_OS_PORTWRITER_H
12 
13 #include <yarp/os/api.h>
14 
15 namespace yarp {
16 namespace os {
17 
18 class ConnectionWriter;
19 class Type;
20 
27 {
28 public:
32  virtual ~PortWriter();
33 
45  virtual bool write(ConnectionWriter& writer) const = 0;
46 
50  virtual void onCompletion() const;
51 
58  virtual void onCommencement() const;
59 
60  virtual yarp::os::Type getWriteType() const;
61 };
62 
63 } // namespace os
64 } // namespace yarp
65 
66 #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:27
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:19
#define YARP_os_API
Definition: api.h:21