YARP
Yet Another Robot Platform
Unwrapped.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_UNWRAPPED_H
7#define YARP_OS_IDL_UNWRAPPED_H
8
12
13namespace yarp::os::idl {
14
15template <class T>
17{
18public:
20
21 bool read(yarp::os::ConnectionReader& reader) override
22 {
23 WireReader wreader(reader);
24 return content.read(wreader);
25 }
26
27 bool write(yarp::os::ConnectionWriter& writer) const override
28 {
29 WireWriter wwriter(writer);
30 return content.write(wwriter);
31 }
32};
33
34template <class T>
36{
37public:
39
41
42 bool read(yarp::os::ConnectionReader& reader) override
43 {
44 WireReader wreader(reader);
45 return content.read(wreader);
46 }
47
48 bool write(yarp::os::ConnectionWriter& writer) const override
49 {
50 WireWriter wwriter(writer);
51 return content.write(wwriter);
52 }
53};
54
55} // namespace yarp::os::idl
56
57#endif // YARP_OS_IDL_UNWRAPPED_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(yarp::os::ConnectionReader &reader) override
Read this object from a network connection.
Definition: Unwrapped.h:42
bool write(yarp::os::ConnectionWriter &writer) const override
Write this object to a network connection.
Definition: Unwrapped.h:48
bool write(yarp::os::ConnectionWriter &writer) const override
Write this object to a network connection.
Definition: Unwrapped.h:27
bool read(yarp::os::ConnectionReader &reader) override
Read this object from a network connection.
Definition: Unwrapped.h:21
IDL-friendly connection reader.
Definition: WireReader.h:27
IDL-friendly connection writer.
Definition: WireWriter.h:28