YARP
Yet Another Robot Platform
PortWriter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2019 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
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:553
#define YARP_OS_API
Definition: api.h:19
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:26
The main, catch-all namespace for YARP.
Definition: numeric.h:47
An interface for writing to a network connection.