YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
QuaternionData.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_QUATERNIONDATA_H
12#define YARP_THRIFT_GENERATOR_STRUCT_QUATERNIONDATA_H
13
14#include <yarp/sig/api.h>
15
16#include <yarp/os/Wire.h>
18
19namespace yarp::sig {
20
23{
24public:
25 // Fields
26 double q_w{0.0};
27 double q_x{0.0};
28 double q_y{0.0};
29 double q_z{0.0};
30
31public:
32 // Default constructor
33 QuaternionData() = default;
34
35 // Constructor with field values
36 QuaternionData(const double q_w,
37 const double q_x,
38 const double q_y,
39 const double q_z);
40
41 // Read structure on a Wire
42 bool read(yarp::os::idl::WireReader& reader) override;
43
44 // Read structure on a Connection
45 bool read(yarp::os::ConnectionReader& connection) override;
46
47 // Write structure on a Wire
48 bool write(const yarp::os::idl::WireWriter& writer) const override;
49
50 // Write structure on a Connection
51 bool write(yarp::os::ConnectionWriter& connection) const override;
52
53 // Convert to a printable string
54 std::string toString() const;
55
56 // If you want to serialize this class without nesting, use this helper
58
59private:
60 // read/write q_w field
61 bool read_q_w(yarp::os::idl::WireReader& reader);
62 bool write_q_w(const yarp::os::idl::WireWriter& writer) const;
63 bool nested_read_q_w(yarp::os::idl::WireReader& reader);
64 bool nested_write_q_w(const yarp::os::idl::WireWriter& writer) const;
65
66 // read/write q_x field
67 bool read_q_x(yarp::os::idl::WireReader& reader);
68 bool write_q_x(const yarp::os::idl::WireWriter& writer) const;
69 bool nested_read_q_x(yarp::os::idl::WireReader& reader);
70 bool nested_write_q_x(const yarp::os::idl::WireWriter& writer) const;
71
72 // read/write q_y field
73 bool read_q_y(yarp::os::idl::WireReader& reader);
74 bool write_q_y(const yarp::os::idl::WireWriter& writer) const;
75 bool nested_read_q_y(yarp::os::idl::WireReader& reader);
76 bool nested_write_q_y(const yarp::os::idl::WireWriter& writer) const;
77
78 // read/write q_z field
79 bool read_q_z(yarp::os::idl::WireReader& reader);
80 bool write_q_z(const yarp::os::idl::WireWriter& writer) const;
81 bool nested_read_q_z(yarp::os::idl::WireReader& reader);
82 bool nested_write_q_z(const yarp::os::idl::WireWriter& writer) const;
83};
84
85} // namespace yarp::sig
86
87#endif // YARP_THRIFT_GENERATOR_STRUCT_QUATERNIONDATA_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< QuaternionData > unwrapped
#define YARP_sig_API
Definition api.h:18