YARP
Yet Another Robot Platform
BareStyle.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_BARESTYLE_H
7 #define YARP_OS_IDL_BARESTYLE_H
8 
10 #include <yarp/os/idl/WireReader.h>
11 #include <yarp/os/idl/WireWriter.h>
12 
13 namespace yarp {
14 namespace os {
15 namespace idl {
16 
17 template <class T>
18 class BareStyle : public T
19 {
20 public:
21  bool read(yarp::os::ConnectionReader& reader) override
22  {
23  return T::readBare(reader);
24  }
25 
26  bool write(yarp::os::ConnectionWriter& writer) const override
27  {
28  return T::writeBare(writer);
29  }
30 };
31 
32 } // namespace idl
33 } // namespace os
34 } // namespace yarp
35 
36 #endif // YARP_OS_IDL_BARESTYLE_H
An interface for reading from a network connection.
An interface for writing to a network connection.
bool write(yarp::os::ConnectionWriter &writer) const override
Definition: BareStyle.h:26
bool read(yarp::os::ConnectionReader &reader) override
Definition: BareStyle.h:21
The main, catch-all namespace for YARP.
Definition: dirs.h:16