YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
BinPortable.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_OS_BINPORTABLE_H
8#define YARP_OS_BINPORTABLE_H
9
10#include <yarp/os/Portable.h>
11
12namespace yarp::os {
13
24template <class T>
25class BinPortable : public Portable
26{
27private:
28 T t;
29
30public:
36 T& content();
37
38 // Documented in Portable
39 bool read(ConnectionReader& connection) override;
40
41 // Documented in Portable
42 bool write(ConnectionWriter& connection) const override;
43};
44
45} // namespace yarp::os
46
48
49#endif // YARP_OS_BINPORTABLE_H
Class for writing and reading simple binary structures.
Definition BinPortable.h:26
bool read(ConnectionReader &connection) override
Read this object from a network connection.
bool write(ConnectionWriter &connection) const override
Write this object to a network connection.
T & content()
Get the internal structure that will be read or written.
A mini-server for performing network communication in the background.
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
An interface to the operating system, including Port based communication.