YARP
Yet Another Robot Platform
BottleStyle.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_OS_IDL_BOTTLESTYLE_H
10 #define YARP_OS_IDL_BOTTLESTYLE_H
11 
13 #include <yarp/os/idl/WireReader.h>
14 #include <yarp/os/idl/WireWriter.h>
15 
16 namespace yarp {
17 namespace os {
18 namespace idl {
19 
20 template <class T>
21 class BottleStyle : public T
22 {
23 public:
24  bool read(yarp::os::ConnectionReader& reader) override
25  {
26  return T::readBottle(reader);
27  }
28 
29  bool write(yarp::os::ConnectionWriter& writer) const override
30  {
31  return T::writeBottle(writer);
32  }
33 };
34 
35 } // namespace idl
36 } // namespace os
37 } // namespace yarp
38 
39 #endif // YARP_OS_IDL_BOTTLESTYLE_H
yarp::os::idl::BottleStyle
Definition: BottleStyle.h:22
WireReader.h
yarp::os::ConnectionWriter
An interface for writing to a network connection.
Definition: ConnectionWriter.h:40
WireWriter.h
yarp::os::idl::BottleStyle::write
bool write(yarp::os::ConnectionWriter &writer) const override
Definition: BottleStyle.h:29
yarp::os::ConnectionReader
An interface for reading from a network connection.
Definition: ConnectionReader.h:40
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
WirePortable.h
yarp::os::idl::BottleStyle::read
bool read(yarp::os::ConnectionReader &reader) override
Definition: BottleStyle.h:24