YARP
Yet Another Robot Platform
PortWriter.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_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
yarp::os::Type
Definition: Type.h:24
api.h
YARP_os_API
#define YARP_os_API
Definition: api.h:19
yarp::os::PortWriter
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:27
yarp::os::PortWriter::~PortWriter
virtual ~PortWriter()
Destructor.
yarp::os::ConnectionWriter
An interface for writing to a network connection.
Definition: ConnectionWriter.h:40
yarp::os::PortWriter::write
virtual bool write(ConnectionWriter &writer) const =0
Write this object to a network connection.
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18