YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
MatrixData.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// Autogenerated by Thrift (based on compiler 0.14.1-yarped)
7// yarpidl_thrift version 2.0 - 11/11/2026
8// This is an automatically generated file.
9// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.
10
11#ifndef YARP_THRIFT_GENERATOR_STRUCT_MATRIXDATA_H
12#define YARP_THRIFT_GENERATOR_STRUCT_MATRIXDATA_H
13
14#include <yarp/sig/api.h>
15
16#include <yarp/os/Wire.h>
18
19namespace yarp::sig {
20
23{
24protected:
25 // Fields
26 std::int32_t nrows{0};
27 std::int32_t ncols{0};
28 std::vector<double> storage{};
29
30public:
31 // Default constructor
32 MatrixData() = default;
33
34 // Constructor with field values
35 MatrixData(const std::int32_t nrows,
36 const std::int32_t ncols,
37 const std::vector<double>& storage);
38
39 // Read structure on a Wire
40 bool read(yarp::os::idl::WireReader& reader) override;
41
42 // Read structure on a Connection
43 bool read(yarp::os::ConnectionReader& connection) override;
44
45 // Write structure on a Wire
46 bool write(const yarp::os::idl::WireWriter& writer) const override;
47
48 // Write structure on a Connection
49 bool write(yarp::os::ConnectionWriter& connection) const override;
50
51 // Convert to a printable string
52 std::string toString() const;
53
54 // If you want to serialize this class without nesting, use this helper
56
57private:
58 // read/write nrows field
59 bool read_nrows(yarp::os::idl::WireReader& reader);
60 bool write_nrows(const yarp::os::idl::WireWriter& writer) const;
61 bool nested_read_nrows(yarp::os::idl::WireReader& reader);
62 bool nested_write_nrows(const yarp::os::idl::WireWriter& writer) const;
63
64 // read/write ncols field
65 bool read_ncols(yarp::os::idl::WireReader& reader);
66 bool write_ncols(const yarp::os::idl::WireWriter& writer) const;
67 bool nested_read_ncols(yarp::os::idl::WireReader& reader);
68 bool nested_write_ncols(const yarp::os::idl::WireWriter& writer) const;
69
70 // read/write storage field
71 bool read_storage(yarp::os::idl::WireReader& reader);
72 bool write_storage(const yarp::os::idl::WireWriter& writer) const;
73 bool nested_read_storage(yarp::os::idl::WireReader& reader);
74 bool nested_write_storage(const yarp::os::idl::WireWriter& writer) const;
75};
76
77} // namespace yarp::sig
78
79#endif // YARP_THRIFT_GENERATOR_STRUCT_MATRIXDATA_H
std::string toString(const T &value)
convert an arbitrary type to string.
An interface for reading from a network connection.
An interface for writing to a network connection.
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
IDL-friendly connection reader.
Definition WireReader.h:27
IDL-friendly connection writer.
Definition WireWriter.h:28
yarp::os::idl::Unwrapped< MatrixData > unwrapped
Definition MatrixData.h:55
#define YARP_sig_API
Definition api.h:18