YARP
Yet Another Robot Platform
Bytes.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_BYTES_H
8 #define YARP_OS_BYTES_H
9 
10 #include <yarp/os/api.h>
11 
12 #include <cstddef>
13 
14 
15 namespace yarp {
16 namespace os {
17 
25 {
26 public:
30  explicit Bytes();
31 
37  Bytes(char* data, size_t len);
38 
42  size_t length() const;
43 
47  const char* get() const;
48 
52  char* get();
53 
54 private:
55  char* data;
56  size_t len;
57 };
58 
59 } // namespace os
60 } // namespace yarp
61 
62 #endif // YARP_OS_BYTES_H
A simple abstraction for a block of bytes.
Definition: Bytes.h:25
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_os_API
Definition: api.h:18