YARP
Yet Another Robot Platform
return_getAllTransforms.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 Compiler (0.14.1-yarped)
7 //
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_RETURN_GETALLTRANSFORMS_H
12 #define YARP_THRIFT_GENERATOR_STRUCT_RETURN_GETALLTRANSFORMS_H
13 
14 #include <yarp/os/Wire.h>
15 #include <yarp/os/idl/WireTypes.h>
17 
20 {
21 public:
22  // Fields
23  bool retvalue;
24  std::vector<yarp::math::FrameTransform> transforms_list;
25 
26  // Default constructor
28 
29  // Constructor with field values
31  const std::vector<yarp::math::FrameTransform>& transforms_list);
32 
33  // Read structure on a Wire
34  bool read(yarp::os::idl::WireReader& reader) override;
35 
36  // Read structure on a Connection
37  bool read(yarp::os::ConnectionReader& connection) override;
38 
39  // Write structure on a Wire
40  bool write(const yarp::os::idl::WireWriter& writer) const override;
41 
42  // Write structure on a Connection
43  bool write(yarp::os::ConnectionWriter& connection) const override;
44 
45  // Convert to a printable string
46  std::string toString() const;
47 
48  // If you want to serialize this class without nesting, use this helper
50 
51  class Editor :
52  public yarp::os::Wire,
54  {
55  public:
56  // Editor: default constructor
57  Editor();
58 
59  // Editor: constructor with base class
61 
62  // Editor: destructor
63  ~Editor() override;
64 
65  // Editor: Deleted constructors and operator=
66  Editor(const Editor& rhs) = delete;
67  Editor(Editor&& rhs) = delete;
68  Editor& operator=(const Editor& rhs) = delete;
69  Editor& operator=(Editor&& rhs) = delete;
70 
71  // Editor: edit
72  bool edit(return_getAllTransforms& obj, bool dirty = true);
73 
74  // Editor: validity check
75  bool isValid() const;
76 
77  // Editor: state
79 
80  // Editor: start editing
81  void start_editing();
82 
83 #ifndef YARP_NO_DEPRECATED // Since YARP 3.2
84  YARP_DEPRECATED_MSG("Use start_editing() instead")
85  void begin()
86  {
87  start_editing();
88  }
89 #endif // YARP_NO_DEPRECATED
90 
91  // Editor: stop editing
92  void stop_editing();
93 
94 #ifndef YARP_NO_DEPRECATED // Since YARP 3.2
95  YARP_DEPRECATED_MSG("Use stop_editing() instead")
96  void end()
97  {
98  stop_editing();
99  }
100 #endif // YARP_NO_DEPRECATED
101 
102  // Editor: retvalue field
103  void set_retvalue(const bool retvalue);
104  bool get_retvalue() const;
105  virtual bool will_set_retvalue();
106  virtual bool did_set_retvalue();
107 
108  // Editor: transforms_list field
109  void set_transforms_list(const std::vector<yarp::math::FrameTransform>& transforms_list);
110  void set_transforms_list(size_t index, const yarp::math::FrameTransform& elem);
111  const std::vector<yarp::math::FrameTransform>& get_transforms_list() const;
112  virtual bool will_set_transforms_list();
113  virtual bool did_set_transforms_list();
114 
115  // Editor: clean
116  void clean();
117 
118  // Editor: read
119  bool read(yarp::os::ConnectionReader& connection) override;
120 
121  // Editor: write
122  bool write(yarp::os::ConnectionWriter& connection) const override;
123 
124  private:
125  // Editor: state
127  bool obj_owned;
128  int group;
129 
130  // Editor: dirty variables
131  bool is_dirty;
132  bool is_dirty_retvalue;
133  bool is_dirty_transforms_list;
134  int dirty_count;
135 
136  // Editor: send if possible
137  void communicate();
138 
139  // Editor: mark dirty overall
140  void mark_dirty();
141 
142  // Editor: mark dirty single fields
143  void mark_dirty_retvalue();
144  void mark_dirty_transforms_list();
145 
146  // Editor: dirty_flags
147  void dirty_flags(bool flag);
148  };
149 
150 private:
151  // read/write retvalue field
152  bool read_retvalue(yarp::os::idl::WireReader& reader);
153  bool write_retvalue(const yarp::os::idl::WireWriter& writer) const;
154  bool nested_read_retvalue(yarp::os::idl::WireReader& reader);
155  bool nested_write_retvalue(const yarp::os::idl::WireWriter& writer) const;
156 
157  // read/write transforms_list field
158  bool read_transforms_list(yarp::os::idl::WireReader& reader);
159  bool write_transforms_list(const yarp::os::idl::WireWriter& writer) const;
160  bool nested_read_transforms_list(yarp::os::idl::WireReader& reader);
161  bool nested_write_transforms_list(const yarp::os::idl::WireWriter& writer) const;
162 };
163 
164 #endif // YARP_THRIFT_GENERATOR_STRUCT_RETURN_GETALLTRANSFORMS_H
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
const std::vector< yarp::math::FrameTransform > & get_transforms_list() const
Editor & operator=(const Editor &rhs)=delete
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool edit(return_getAllTransforms &obj, bool dirty=true)
void set_transforms_list(const std::vector< yarp::math::FrameTransform > &transforms_list)
Editor & operator=(Editor &&rhs)=delete
Editor(const Editor &rhs)=delete
Editor(Editor &&rhs)=delete
yarp::os::idl::Unwrapped< return_getAllTransforms > unwrapped
bool read(yarp::os::idl::WireReader &reader) override
bool write(const yarp::os::idl::WireWriter &writer) const override
std::vector< yarp::math::FrameTransform > transforms_list
An interface for reading from a network connection.
An interface for writing to a network connection.
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:24
Base class for IDL client/server.
Definition: Wire.h:19
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
Definition: WirePortable.h:23
IDL-friendly connection reader.
Definition: WireReader.h:30
IDL-friendly connection writer.
Definition: WireWriter.h:30
#define YARP_DEPRECATED_MSG(MSG)
Expands to either the standard [[deprecated]] attribute or a compiler-specific decorator such as __at...
Definition: compiler.h:2885