YARP
Yet Another Robot Platform
WirePortable.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_IDL_WIREPORTABLE_H
7#define YARP_OS_IDL_WIREPORTABLE_H
8
9#include <yarp/os/Portable.h>
10
11namespace yarp::os::idl {
12
13class WireReader;
14class WireWriter;
15
21{
22public:
25
26 virtual bool read(yarp::os::idl::WireReader& reader);
27
28 virtual bool write(const yarp::os::idl::WireWriter& writer) const;
29
31 {
32 return read(reader);
33 }
34
35 virtual bool writeBare(yarp::os::ConnectionWriter& writer) const
36 {
37 return write(writer);
38 }
39
41 {
42 return read(reader);
43 }
44
45 virtual bool writeBottle(yarp::os::ConnectionWriter& writer) const
46 {
47 return write(writer);
48 }
49};
50
51} // namespace yarp::os::idl
52
53#endif // YARP_OS_IDL_WIREPORTABLE_H
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
Definition: Portable.h:25
bool read(ConnectionReader &reader) override=0
Read this object from a network connection.
bool write(ConnectionWriter &writer) const override=0
Write this object to a network connection.
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
Definition: WirePortable.h:21
virtual bool readBare(yarp::os::ConnectionReader &reader)
Definition: WirePortable.h:30
virtual bool writeBare(yarp::os::ConnectionWriter &writer) const
Definition: WirePortable.h:35
virtual bool readBottle(yarp::os::ConnectionReader &reader)
Definition: WirePortable.h:40
virtual bool writeBottle(yarp::os::ConnectionWriter &writer) const
Definition: WirePortable.h:45
IDL-friendly connection reader.
Definition: WireReader.h:27
IDL-friendly connection writer.
Definition: WireWriter.h:28
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
Definition: ImageFile.cpp:915
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:1091
#define YARP_os_API
Definition: api.h:18