EmbeddedProto  2.0.0
EmbeddedProto is a C++ Protocol Buffer implementation specifically suitable for microcontrollers.
Fields.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Embedded AMS B.V. - All Rights Reserved
3  *
4  * This file is part of Embedded Proto.
5  *
6  * Embedded Proto is open source software: you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as published
8  * by the Free Software Foundation, version 3 of the license.
9  *
10  * Embedded Proto is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with Embedded Proto. If not, see <https://www.gnu.org/licenses/>.
17  *
18  * For commercial and closed source application please visit:
19  * <https://EmbeddedProto.com/license/>.
20  *
21  * Embedded AMS B.V.
22  * Info:
23  * info at EmbeddedProto dot com
24  *
25  * Postal address:
26  * Johan Huizingalaan 763a
27  * 1066 VH, Amsterdam
28  * the Netherlands
29  */
30 
31 #ifndef _FIELDS_H_
32 #define _FIELDS_H_
33 
34 #include "Errors.h"
35 #include "WireFormatter.h"
36 #include "WriteBufferInterface.h"
37 #include "ReadBufferInterface.h"
38 
39 #include <cstdint>
40 
41 
42 namespace EmbeddedProto
43 {
44 
45  class Field
46  {
47  public:
48  Field() = default;
49  virtual ~Field() = default;
50 
51  virtual Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const = 0;
52 
53  virtual Error serialize(WriteBufferInterface& buffer) const = 0;
54 
55  virtual Error deserialize(ReadBufferInterface& buffer) = 0;
56 
58 
61  uint32_t serialized_size() const;
62 
64  virtual void clear() = 0;
65  };
66 
67  template<class TYPE>
68  class FieldTemplate : public Field
69  {
70  public:
71  typedef TYPE FIELD_TYPE;
72 
73  FieldTemplate() = default;
74  FieldTemplate(const TYPE& v) : value_(v) { };
75  FieldTemplate(const TYPE&& v) : value_(v) { };
76  ~FieldTemplate() override = default;
77 
78  void set(const TYPE& v) { value_ = v; }
79  void set(const TYPE&& v) { value_ = v; }
80  void operator=(const TYPE& v) { value_ = v; }
81  void operator=(const TYPE&& v) { value_ = v; }
82 
83  const TYPE& get() const { return value_; }
84  TYPE& get() { return value_; }
85 
86  operator TYPE() const { return value_; }
87 
88  bool operator==(const TYPE& rhs) { return value_ == rhs; }
89  bool operator!=(const TYPE& rhs) { return value_ != rhs; }
90  bool operator>(const TYPE& rhs) { return value_ > rhs; }
91  bool operator<(const TYPE& rhs) { return value_ < rhs; }
92  bool operator>=(const TYPE& rhs) { return value_ >= rhs; }
93  bool operator<=(const TYPE& rhs) { return value_ <= rhs; }
94 
95  template<class TYPE_RHS>
96  bool operator==(const FieldTemplate<TYPE_RHS>& rhs) { return value_ == rhs.get(); }
97  template<class TYPE_RHS>
98  bool operator!=(const FieldTemplate<TYPE_RHS>& rhs) { return value_ != rhs.get(); }
99  template<class TYPE_RHS>
100  bool operator>(const FieldTemplate<TYPE_RHS>& rhs) { return value_ > rhs.get(); }
101  template<class TYPE_RHS>
102  bool operator<(const FieldTemplate<TYPE_RHS>& rhs) { return value_ < rhs.get(); }
103  template<class TYPE_RHS>
104  bool operator>=(const FieldTemplate<TYPE_RHS>& rhs) { return value_ >= rhs.get(); }
105  template<class TYPE_RHS>
106  bool operator<=(const FieldTemplate<TYPE_RHS>& rhs) { return value_ <= rhs.get(); }
107 
108  void clear() override { value_ = static_cast<TYPE>(0); }
109 
110  private:
111 
112  TYPE value_;
113  };
114 
115 
116  class int32 : public FieldTemplate<int32_t>
117  {
118  public:
119  int32() : FieldTemplate<int32_t>(0) {};
120  int32(const int32_t& v) : FieldTemplate<int32_t>(v) {};
121  int32(const int32_t&& v) : FieldTemplate<int32_t>(v) {};
122 
123  ~int32() override = default;
124 
125  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
126  Error serialize(WriteBufferInterface& buffer) const final;
127  Error deserialize(ReadBufferInterface& buffer) final;
128  };
129 
130  class int64 : public FieldTemplate<int64_t>
131  {
132  public:
133  int64() : FieldTemplate<int64_t>(0) {};
134  int64(const int64_t& v) : FieldTemplate<int64_t>(v) {};
135  int64(const int64_t&& v) : FieldTemplate<int64_t>(v) {};
136 
137  ~int64() override = default;
138 
139  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
140  Error serialize(WriteBufferInterface& buffer) const final;
141  Error deserialize(ReadBufferInterface& buffer) final;
142  };
143 
144  class uint32 : public FieldTemplate<uint32_t>
145  {
146  public:
147  uint32() : FieldTemplate<uint32_t>(0) {};
148  uint32(const uint32_t& v) : FieldTemplate<uint32_t>(v) {};
149  uint32(const uint32_t&& v) : FieldTemplate<uint32_t>(v) {};
150 
151  ~uint32() override = default;
152 
153  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
154  Error serialize(WriteBufferInterface& buffer) const final;
155  Error deserialize(ReadBufferInterface& buffer) final;
156  };
157 
158  class uint64 : public FieldTemplate<uint64_t>
159  {
160  public:
161  uint64() : FieldTemplate<uint64_t>(0) {};
162  uint64(const uint64_t& v) : FieldTemplate<uint64_t>(v) {};
163  uint64(const uint64_t&& v) : FieldTemplate<uint64_t>(v) {};
164 
165  ~uint64() override = default;
166 
167  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
168  Error serialize(WriteBufferInterface& buffer) const final;
169  Error deserialize(ReadBufferInterface& buffe) final;
170  };
171 
172  class sint32 : public FieldTemplate<int32_t>
173  {
174  public:
175  sint32() : FieldTemplate<int32_t>(0) {};
176  sint32(const int32_t& v) : FieldTemplate<int32_t>(v) {};
177  sint32(const int32_t&& v) : FieldTemplate<int32_t>(v) {};
178 
179  ~sint32() override = default;
180 
181  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
182  Error serialize(WriteBufferInterface& buffer) const final;
183  Error deserialize(ReadBufferInterface& buffer) final;
184  };
185 
186  class sint64 : public FieldTemplate<int64_t>
187  {
188  public:
189  sint64() : FieldTemplate<int64_t>(0) {};
190  sint64(const int64_t& v) : FieldTemplate<int64_t>(v) {};
191  sint64(const int64_t&& v) : FieldTemplate<int64_t>(v) {};
192 
193  ~sint64() override = default;
194 
195  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
196  Error serialize(WriteBufferInterface& buffer) const final;
197  Error deserialize(ReadBufferInterface& buffer) final;
198  };
199 
200  class boolean : public FieldTemplate<bool>
201  {
202  public:
203  boolean() : FieldTemplate<bool>(false) {};
204  boolean(const bool& v) : FieldTemplate<bool>(v) {};
205  boolean(const bool&& v) : FieldTemplate<bool>(v) {};
206 
207  ~boolean() override = default;
208 
209  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
210  Error serialize(WriteBufferInterface& buffer) const final;
211  Error deserialize(ReadBufferInterface& buffer) final;
212  };
213 
214  class fixed32 : public FieldTemplate<uint32_t>
215  {
216  public:
217  fixed32() : FieldTemplate<uint32_t>(0) {};
218  fixed32(const uint32_t& v) : FieldTemplate<uint32_t>(v) {};
219  fixed32(const uint32_t&& v) : FieldTemplate<uint32_t>(v) {};
220 
221  ~fixed32() override = default;
222 
223  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
224  Error serialize(WriteBufferInterface& buffer) const final;
225  Error deserialize(ReadBufferInterface& buffer) final;
226  };
227 
228  class fixed64 : public FieldTemplate<uint64_t>
229  {
230  public:
231  fixed64() : FieldTemplate<uint64_t>(0) {};
232  fixed64(const uint64_t& v) : FieldTemplate<uint64_t>(v) {};
233  fixed64(const uint64_t&& v) : FieldTemplate<uint64_t>(v) {};
234 
235  ~fixed64() override = default;
236 
237  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
238  Error serialize(WriteBufferInterface& buffer) const final;
239  Error deserialize(ReadBufferInterface& buffer) final;
240  };
241 
242  class sfixed32 : public FieldTemplate<int32_t>
243  {
244  public:
245  sfixed32() : FieldTemplate<int32_t>(0) {};
246  sfixed32(const int32_t& v) : FieldTemplate<int32_t>(v) {};
247  sfixed32(const int32_t&& v) : FieldTemplate<int32_t>(v) {};
248 
249  ~sfixed32() override = default;
250 
251  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
252  Error serialize(WriteBufferInterface& buffer) const final;
253  Error deserialize(ReadBufferInterface& buffer) final;
254  };
255 
256  class sfixed64 : public FieldTemplate<int64_t>
257  {
258  public:
259  sfixed64() : FieldTemplate<int64_t>(0) {};
260  sfixed64(const int64_t& v) : FieldTemplate<int64_t>(v) {};
261  sfixed64(const int64_t&& v) : FieldTemplate<int64_t>(v) {};
262 
263  ~sfixed64() override = default;
264 
265  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
266  Error serialize(WriteBufferInterface& buffer) const final;
267  Error deserialize(ReadBufferInterface& buffer) final;
268  };
269 
270  class floatfixed : public FieldTemplate<float>
271  {
272  public:
273  floatfixed() : FieldTemplate<float>(0.0F) {};
274  floatfixed(const float& v) : FieldTemplate<float>(v) {};
275  floatfixed(const float&& v) : FieldTemplate<float>(v) {};
276 
277  ~floatfixed() override = default;
278 
279  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
280  Error serialize(WriteBufferInterface& buffer) const final;
281  Error deserialize(ReadBufferInterface& buffer) final;
282  };
283 
284  class doublefixed : public FieldTemplate<double>
285  {
286  public:
287  doublefixed() : FieldTemplate<double>(0.0) {};
288  doublefixed(const double& v) : FieldTemplate<double>(v) {};
289  doublefixed(const double&& v) : FieldTemplate<double>(v) {};
290 
291  ~doublefixed() override = default;
292 
293  Error serialize_with_id(uint32_t field_number, WriteBufferInterface& buffer) const final;
294  Error serialize(WriteBufferInterface& buffer) const final;
295  Error deserialize(ReadBufferInterface& buffer) final;
296  };
297 
298 } // End of namespace EmbeddedProto.
299 #endif
EmbeddedProto::sint32::~sint32
~sint32() override=default
EmbeddedProto::FieldTemplate::operator!=
bool operator!=(const FieldTemplate< TYPE_RHS > &rhs)
Definition: Fields.h:98
EmbeddedProto::int32::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:175
EmbeddedProto::int64::int64
int64(const int64_t &v)
Definition: Fields.h:134
EmbeddedProto::Field
Definition: Fields.h:45
EmbeddedProto::sint64::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:93
EmbeddedProto::uint64::uint64
uint64()
Definition: Fields.h:161
Errors.h
EmbeddedProto::sint32
Definition: Fields.h:172
EmbeddedProto::doublefixed::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:303
EmbeddedProto::uint32::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:185
EmbeddedProto::fixed32::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:211
EmbeddedProto::fixed32
Definition: Fields.h:214
EmbeddedProto::int32
Definition: Fields.h:116
EmbeddedProto::boolean::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:103
EmbeddedProto::floatfixed::floatfixed
floatfixed()
Definition: Fields.h:273
EmbeddedProto::doublefixed::~doublefixed
~doublefixed() override=default
EmbeddedProto::FieldTemplate::operator>=
bool operator>=(const TYPE &rhs)
Definition: Fields.h:92
EmbeddedProto::fixed64::~fixed64
~fixed64() override=default
EmbeddedProto::sfixed64::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:143
EmbeddedProto::FieldTemplate::operator<
bool operator<(const FieldTemplate< TYPE_RHS > &rhs)
Definition: Fields.h:102
EmbeddedProto::int64::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:180
EmbeddedProto::uint32::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:63
EmbeddedProto::FieldTemplate::clear
void clear() override
Reset the field to it's initial value.
Definition: Fields.h:108
EmbeddedProto::fixed32::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:113
EmbeddedProto::uint32
Definition: Fields.h:144
EmbeddedProto::sint64::~sint64
~sint64() override=default
EmbeddedProto::sfixed64::sfixed64
sfixed64()
Definition: Fields.h:259
EmbeddedProto::boolean::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:273
EmbeddedProto::sfixed32::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:221
EmbeddedProto::floatfixed::floatfixed
floatfixed(const float &&v)
Definition: Fields.h:275
EmbeddedProto::int32::int32
int32()
Definition: Fields.h:119
EmbeddedProto::FieldTemplate::operator<=
bool operator<=(const FieldTemplate< TYPE_RHS > &rhs)
Definition: Fields.h:106
EmbeddedProto::int64::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:53
EmbeddedProto::ReadBufferInterface
The pure virtual definition of a message buffer to read from.
Definition: ReadBufferInterface.h:43
EmbeddedProto::fixed32::~fixed32
~fixed32() override=default
EmbeddedProto::Field::~Field
virtual ~Field()=default
EmbeddedProto::doublefixed
Definition: Fields.h:284
EmbeddedProto::Field::serialize
virtual Error serialize(WriteBufferInterface &buffer) const =0
EmbeddedProto::doublefixed::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:236
EmbeddedProto::sfixed32::sfixed32
sfixed32()
Definition: Fields.h:245
EmbeddedProto::boolean::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:205
EmbeddedProto::fixed32::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:278
EmbeddedProto::sint32::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:83
EmbeddedProto::fixed32::fixed32
fixed32()
Definition: Fields.h:217
EmbeddedProto::uint64::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:73
EmbeddedProto::sfixed64::sfixed64
sfixed64(const int64_t &&v)
Definition: Fields.h:261
EmbeddedProto::sint64::sint64
sint64()
Definition: Fields.h:189
EmbeddedProto::int32::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:243
EmbeddedProto::fixed64::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:216
EmbeddedProto::sint64
Definition: Fields.h:186
EmbeddedProto::floatfixed::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:298
EmbeddedProto::FieldTemplate::FIELD_TYPE
TYPE FIELD_TYPE
Definition: Fields.h:71
EmbeddedProto::sfixed64::~sfixed64
~sfixed64() override=default
EmbeddedProto::doublefixed::doublefixed
doublefixed()
Definition: Fields.h:287
EmbeddedProto::uint64::deserialize
Error deserialize(ReadBufferInterface &buffe) final
Definition: Fields.cpp:258
EmbeddedProto::FieldTemplate::FieldTemplate
FieldTemplate(const TYPE &&v)
Definition: Fields.h:75
EmbeddedProto::int32::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:43
EmbeddedProto
Definition: Errors.h:34
EmbeddedProto::fixed64::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:123
EmbeddedProto::sfixed32::~sfixed32
~sfixed32() override=default
EmbeddedProto::FieldTemplate::operator=
void operator=(const TYPE &&v)
Definition: Fields.h:81
EmbeddedProto::int32::int32
int32(const int32_t &v)
Definition: Fields.h:120
EmbeddedProto::uint32::uint32
uint32()
Definition: Fields.h:147
EmbeddedProto::uint32::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:253
EmbeddedProto::uint64
Definition: Fields.h:158
EmbeddedProto::FieldTemplate::operator!=
bool operator!=(const TYPE &rhs)
Definition: Fields.h:89
EmbeddedProto::sfixed32::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:288
EmbeddedProto::sfixed32::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:133
EmbeddedProto::doublefixed::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:163
EmbeddedProto::Field::clear
virtual void clear()=0
Reset the field to it's initial value.
EmbeddedProto::int64::int64
int64(const int64_t &&v)
Definition: Fields.h:135
EmbeddedProto::doublefixed::doublefixed
doublefixed(const double &v)
Definition: Fields.h:288
EmbeddedProto::Field::serialized_size
uint32_t serialized_size() const
Calculate the size of this message when serialized.
Definition: Fields.cpp:36
EmbeddedProto::WriteBufferInterface
The pure virtual definition of a message buffer used for writing .
Definition: WriteBufferInterface.h:46
EmbeddedProto::sfixed64::sfixed64
sfixed64(const int64_t &v)
Definition: Fields.h:260
EmbeddedProto::Error
Error
This enumeration defines errors which can occur during serialization and deserialization.
Definition: Errors.h:38
EmbeddedProto::boolean
Definition: Fields.h:200
EmbeddedProto::uint32::uint32
uint32(const uint32_t &v)
Definition: Fields.h:148
EmbeddedProto::sfixed32::sfixed32
sfixed32(const int32_t &&v)
Definition: Fields.h:247
EmbeddedProto::fixed32::fixed32
fixed32(const uint32_t &&v)
Definition: Fields.h:219
EmbeddedProto::FieldTemplate::set
void set(const TYPE &&v)
Definition: Fields.h:79
EmbeddedProto::FieldTemplate::operator==
bool operator==(const FieldTemplate< TYPE_RHS > &rhs)
Definition: Fields.h:96
EmbeddedProto::FieldTemplate::operator=
void operator=(const TYPE &v)
Definition: Fields.h:80
EmbeddedProto::fixed32::fixed32
fixed32(const uint32_t &v)
Definition: Fields.h:218
EmbeddedProto::FieldTemplate::get
const TYPE & get() const
Definition: Fields.h:83
EmbeddedProto::sint32::sint32
sint32(const int32_t &v)
Definition: Fields.h:176
EmbeddedProto::int64::int64
int64()
Definition: Fields.h:133
EmbeddedProto::fixed64::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:283
EmbeddedProto::sint32::sint32
sint32()
Definition: Fields.h:175
EmbeddedProto::Field::Field
Field()=default
EmbeddedProto::floatfixed::~floatfixed
~floatfixed() override=default
EmbeddedProto::FieldTemplate::operator==
bool operator==(const TYPE &rhs)
Definition: Fields.h:88
EmbeddedProto::sint64::sint64
sint64(const int64_t &&v)
Definition: Fields.h:191
EmbeddedProto::int64::~int64
~int64() override=default
EmbeddedProto::floatfixed::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:231
EmbeddedProto::int64::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:248
ReadBufferInterface.h
EmbeddedProto::floatfixed
Definition: Fields.h:270
EmbeddedProto::FieldTemplate::operator<=
bool operator<=(const TYPE &rhs)
Definition: Fields.h:93
EmbeddedProto::fixed64::fixed64
fixed64(const uint64_t &&v)
Definition: Fields.h:233
EmbeddedProto::Field::serialize_with_id
virtual Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const =0
EmbeddedProto::FieldTemplate
Definition: Fields.h:68
EmbeddedProto::sfixed64
Definition: Fields.h:256
EmbeddedProto::boolean::~boolean
~boolean() override=default
EmbeddedProto::boolean::boolean
boolean(const bool &&v)
Definition: Fields.h:205
EmbeddedProto::floatfixed::serialize_with_id
Error serialize_with_id(uint32_t field_number, WriteBufferInterface &buffer) const final
Definition: Fields.cpp:153
EmbeddedProto::boolean::boolean
boolean(const bool &v)
Definition: Fields.h:204
EmbeddedProto::uint64::~uint64
~uint64() override=default
EmbeddedProto::floatfixed::floatfixed
floatfixed(const float &v)
Definition: Fields.h:274
WireFormatter.h
EmbeddedProto::FieldTemplate::FieldTemplate
FieldTemplate()=default
EmbeddedProto::sfixed64::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:226
EmbeddedProto::FieldTemplate::operator<
bool operator<(const TYPE &rhs)
Definition: Fields.h:91
WriteBufferInterface.h
EmbeddedProto::Field::deserialize
virtual Error deserialize(ReadBufferInterface &buffer)=0
EmbeddedProto::uint64::uint64
uint64(const uint64_t &&v)
Definition: Fields.h:163
EmbeddedProto::sfixed32
Definition: Fields.h:242
EmbeddedProto::sint32::sint32
sint32(const int32_t &&v)
Definition: Fields.h:177
EmbeddedProto::FieldTemplate::operator>=
bool operator>=(const FieldTemplate< TYPE_RHS > &rhs)
Definition: Fields.h:104
EmbeddedProto::sint32::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:263
EmbeddedProto::sint64::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:268
EmbeddedProto::FieldTemplate::get
TYPE & get()
Definition: Fields.h:84
EmbeddedProto::FieldTemplate::FieldTemplate
FieldTemplate(const TYPE &v)
Definition: Fields.h:74
EmbeddedProto::boolean::boolean
boolean()
Definition: Fields.h:203
EmbeddedProto::uint64::uint64
uint64(const uint64_t &v)
Definition: Fields.h:162
EmbeddedProto::FieldTemplate::operator>
bool operator>(const TYPE &rhs)
Definition: Fields.h:90
EmbeddedProto::FieldTemplate::~FieldTemplate
~FieldTemplate() override=default
EmbeddedProto::sfixed64::deserialize
Error deserialize(ReadBufferInterface &buffer) final
Definition: Fields.cpp:293
EmbeddedProto::uint32::uint32
uint32(const uint32_t &&v)
Definition: Fields.h:149
EmbeddedProto::fixed64
Definition: Fields.h:228
EmbeddedProto::sfixed32::sfixed32
sfixed32(const int32_t &v)
Definition: Fields.h:246
EmbeddedProto::doublefixed::doublefixed
doublefixed(const double &&v)
Definition: Fields.h:289
EmbeddedProto::sint32::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:195
EmbeddedProto::int32::~int32
~int32() override=default
EmbeddedProto::int32::int32
int32(const int32_t &&v)
Definition: Fields.h:121
EmbeddedProto::fixed64::fixed64
fixed64(const uint64_t &v)
Definition: Fields.h:232
EmbeddedProto::sint64::sint64
sint64(const int64_t &v)
Definition: Fields.h:190
EmbeddedProto::FieldTemplate::operator>
bool operator>(const FieldTemplate< TYPE_RHS > &rhs)
Definition: Fields.h:100
EmbeddedProto::int64
Definition: Fields.h:130
EmbeddedProto::uint64::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:190
EmbeddedProto::sint64::serialize
Error serialize(WriteBufferInterface &buffer) const final
Definition: Fields.cpp:200
EmbeddedProto::FieldTemplate::set
void set(const TYPE &v)
Definition: Fields.h:78
EmbeddedProto::uint32::~uint32
~uint32() override=default
EmbeddedProto::fixed64::fixed64
fixed64()
Definition: Fields.h:231