Ignition Msgs

API Reference

5.8.1
battery.pb.h
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: ignition/msgs/battery.proto
3 
4 #ifndef GOOGLE_PROTOBUF_INCLUDED_ignition_2fmsgs_2fbattery_2eproto
5 #define GOOGLE_PROTOBUF_INCLUDED_ignition_2fmsgs_2fbattery_2eproto
6 
7 #include <limits>
8 #include <string>
9 
10 #include <google/protobuf/port_def.inc>
11 #if PROTOBUF_VERSION < 3019000
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
14 #error your headers.
15 #endif
16 #if 3019000 < PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
20 #endif
21 
22 #include <google/protobuf/port_undef.inc>
23 #include <google/protobuf/io/coded_stream.h>
24 #include <google/protobuf/arena.h>
25 #include <google/protobuf/arenastring.h>
26 #include <google/protobuf/generated_message_table_driven.h>
27 #include <google/protobuf/generated_message_util.h>
28 #include <google/protobuf/metadata_lite.h>
29 #include <google/protobuf/generated_message_reflection.h>
30 #include <google/protobuf/message.h>
31 #include <google/protobuf/repeated_field.h> // IWYU pragma: export
32 #include <google/protobuf/extension_set.h> // IWYU pragma: export
33 #include <google/protobuf/unknown_field_set.h>
35 #ifndef _MSC_VER
36 #pragma GCC system_header
37 #else
38 #pragma warning(push)
39 #pragma warning(disable: 4244 4267 4100 4244 4512 4127 4068 4275 4251)
40 #endif
41 #ifdef __linux__
42 #include <sys/sysmacros.h>
43 #endif
44 #include <memory>
45 #include <ignition/msgs/Export.hh>
46 // @@protoc_insertion_point(includes)
47 #include <google/protobuf/port_def.inc>
48 #define PROTOBUF_INTERNAL_EXPORT_ignition_2fmsgs_2fbattery_2eproto IGNITION_MSGS_VISIBLE
49 PROTOBUF_NAMESPACE_OPEN
50 namespace internal {
51 class AnyMetadata;
52 } // namespace internal
53 PROTOBUF_NAMESPACE_CLOSE
54 
55 // Internal implementation detail -- do not use these members.
56 struct IGNITION_MSGS_VISIBLE TableStruct_ignition_2fmsgs_2fbattery_2eproto {
57  static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
58  PROTOBUF_SECTION_VARIABLE(protodesc_cold);
59  static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
60  PROTOBUF_SECTION_VARIABLE(protodesc_cold);
61  static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
62  PROTOBUF_SECTION_VARIABLE(protodesc_cold);
63  static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
64  static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
65  static const uint32_t offsets[];
66 };
67 IGNITION_MSGS_VISIBLE extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ignition_2fmsgs_2fbattery_2eproto;
68 namespace ignition {
69 namespace msgs {
70 class Battery;
71 struct BatteryDefaultTypeInternal;
72 IGNITION_MSGS_VISIBLE extern BatteryDefaultTypeInternal _Battery_default_instance_;
73 } // namespace msgs
74 } // namespace ignition
75 PROTOBUF_NAMESPACE_OPEN
76 template<> IGNITION_MSGS_VISIBLE ::ignition::msgs::Battery* Arena::CreateMaybeMessage<::ignition::msgs::Battery>(Arena*);
77 PROTOBUF_NAMESPACE_CLOSE
78 namespace ignition {
79 namespace msgs {
80 
81 // ===================================================================
82 
83 class IGNITION_MSGS_VISIBLE Battery final :
84  public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ignition.msgs.Battery) */ {
85  public:
86  inline Battery() : Battery(nullptr) {}
87  ~Battery() override;
88  explicit constexpr Battery(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
89 
90  Battery(const Battery& from);
91  Battery(Battery&& from) noexcept
92  : Battery() {
93  *this = ::std::move(from);
94  }
95 
96  inline Battery& operator=(const Battery& from) {
97  CopyFrom(from);
98  return *this;
99  }
100  inline Battery& operator=(Battery&& from) noexcept {
101  if (this == &from) return *this;
102  if (GetOwningArena() == from.GetOwningArena()
103  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
104  && GetOwningArena() != nullptr
105  #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
106  ) {
107  InternalSwap(&from);
108  } else {
109  CopyFrom(from);
110  }
111  return *this;
112  }
113 
114  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
115  return GetDescriptor();
116  }
117  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
118  return default_instance().GetMetadata().descriptor;
119  }
120  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
121  return default_instance().GetMetadata().reflection;
122  }
123  static const Battery& default_instance() {
124  return *internal_default_instance();
125  }
126  static inline const Battery* internal_default_instance() {
127  return reinterpret_cast<const Battery*>(
129  }
130  static constexpr int kIndexInFileMessages =
131  0;
132 
133  friend void swap(Battery& a, Battery& b) {
134  a.Swap(&b);
135  }
136  inline void Swap(Battery* other) {
137  if (other == this) return;
138  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
139  if (GetOwningArena() != nullptr &&
140  GetOwningArena() == other->GetOwningArena()) {
141  #else // PROTOBUF_FORCE_COPY_IN_SWAP
142  if (GetOwningArena() == other->GetOwningArena()) {
143  #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
144  InternalSwap(other);
145  } else {
146  ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
147  }
148  }
149  void UnsafeArenaSwap(Battery* other) {
150  if (other == this) return;
151  GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
152  InternalSwap(other);
153  }
154 
155  // implements Message ----------------------------------------------
156 
157  Battery* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
158  return CreateMaybeMessage<Battery>(arena);
159  }
160  using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
161  void CopyFrom(const Battery& from);
162  using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
163  void MergeFrom(const Battery& from);
164  private:
165  static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
166  public:
167  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
168  bool IsInitialized() const final;
169 
170  size_t ByteSizeLong() const final;
171  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
172  uint8_t* _InternalSerialize(
173  uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
174  int GetCachedSize() const final { return _cached_size_.Get(); }
175 
176  private:
177  void SharedCtor();
178  void SharedDtor();
179  void SetCachedSize(int size) const final;
180  void InternalSwap(Battery* other);
181 
182  private:
183  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
184  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
185  return "ignition.msgs.Battery";
186  }
187  protected:
188  explicit Battery(::PROTOBUF_NAMESPACE_ID::Arena* arena,
189  bool is_message_owned = false);
190  private:
191  static void ArenaDtor(void* object);
192  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
193  public:
194 
195  static const ClassData _class_data_;
196  const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
197 
198  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
199 
200  // nested types ----------------------------------------------------
201 
202  // accessors -------------------------------------------------------
203 
204  enum : int {
205  kNameFieldNumber = 2,
206  kHeaderFieldNumber = 1,
207  kVoltageFieldNumber = 3,
208  };
209  // string name = 2;
210  void clear_name();
211  const std::string& name() const;
212  template <typename ArgT0 = const std::string&, typename... ArgT>
213  void set_name(ArgT0&& arg0, ArgT... args);
214  std::string* mutable_name();
215  PROTOBUF_NODISCARD std::string* release_name();
216  void set_allocated_name(std::string* name);
217  private:
218  const std::string& _internal_name() const;
219  inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value);
220  std::string* _internal_mutable_name();
221  public:
222 
223  // .ignition.msgs.Header header = 1;
224  bool has_header() const;
225  private:
226  bool _internal_has_header() const;
227  public:
228  void clear_header();
229  const ::ignition::msgs::Header& header() const;
230  PROTOBUF_NODISCARD ::ignition::msgs::Header* release_header();
231  ::ignition::msgs::Header* mutable_header();
232  void set_allocated_header(::ignition::msgs::Header* header);
233  private:
234  const ::ignition::msgs::Header& _internal_header() const;
235  ::ignition::msgs::Header* _internal_mutable_header();
236  public:
237  void unsafe_arena_set_allocated_header(
238  ::ignition::msgs::Header* header);
239  ::ignition::msgs::Header* unsafe_arena_release_header();
240 
241  // double voltage = 3;
242  void clear_voltage();
243  double voltage() const;
244  void set_voltage(double value);
245  private:
246  double _internal_voltage() const;
247  void _internal_set_voltage(double value);
248  public:
249 
250  // @@protoc_insertion_point(class_scope:ignition.msgs.Battery)
251  private:
252  class _Internal;
253 
254  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
255  typedef void InternalArenaConstructable_;
256  typedef void DestructorSkippable_;
257  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
258  ::ignition::msgs::Header* header_;
259  double voltage_;
260  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
261  friend struct ::TableStruct_ignition_2fmsgs_2fbattery_2eproto;
262 };
263 // ===================================================================
264 
265 
266 // ===================================================================
267 
268 #ifdef __GNUC__
269  #pragma GCC diagnostic push
270  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
271 #endif // __GNUC__
272 // Battery
273 
274 // .ignition.msgs.Header header = 1;
275 inline bool Battery::_internal_has_header() const {
276  return this != internal_default_instance() && header_ != nullptr;
277 }
278 inline bool Battery::has_header() const {
279  return _internal_has_header();
280 }
281 inline const ::ignition::msgs::Header& Battery::_internal_header() const {
282  const ::ignition::msgs::Header* p = header_;
283  return p != nullptr ? *p : reinterpret_cast<const ::ignition::msgs::Header&>(
285 }
286 inline const ::ignition::msgs::Header& Battery::header() const {
287  // @@protoc_insertion_point(field_get:ignition.msgs.Battery.header)
288  return _internal_header();
289 }
291  ::ignition::msgs::Header* header) {
292  if (GetArenaForAllocation() == nullptr) {
293  delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header_);
294  }
295  header_ = header;
296  if (header) {
297 
298  } else {
299 
300  }
301  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ignition.msgs.Battery.header)
302 }
303 inline ::ignition::msgs::Header* Battery::release_header() {
304 
305  ::ignition::msgs::Header* temp = header_;
306  header_ = nullptr;
307 #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
308  auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
309  temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
310  if (GetArenaForAllocation() == nullptr) { delete old; }
311 #else // PROTOBUF_FORCE_COPY_IN_RELEASE
312  if (GetArenaForAllocation() != nullptr) {
313  temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
314  }
315 #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
316  return temp;
317 }
318 inline ::ignition::msgs::Header* Battery::unsafe_arena_release_header() {
319  // @@protoc_insertion_point(field_release:ignition.msgs.Battery.header)
320 
321  ::ignition::msgs::Header* temp = header_;
322  header_ = nullptr;
323  return temp;
324 }
325 inline ::ignition::msgs::Header* Battery::_internal_mutable_header() {
326 
327  if (header_ == nullptr) {
328  auto* p = CreateMaybeMessage<::ignition::msgs::Header>(GetArenaForAllocation());
329  header_ = p;
330  }
331  return header_;
332 }
333 inline ::ignition::msgs::Header* Battery::mutable_header() {
334  ::ignition::msgs::Header* _msg = _internal_mutable_header();
335  // @@protoc_insertion_point(field_mutable:ignition.msgs.Battery.header)
336  return _msg;
337 }
339  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
340  if (message_arena == nullptr) {
341  delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(header_);
342  }
343  if (header) {
344  ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
345  ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
346  ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
347  reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header));
348  if (message_arena != submessage_arena) {
349  header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
350  message_arena, header, submessage_arena);
351  }
352 
353  } else {
354 
355  }
356  header_ = header;
357  // @@protoc_insertion_point(field_set_allocated:ignition.msgs.Battery.header)
358 }
359 
360 // string name = 2;
361 inline void Battery::clear_name() {
362  name_.ClearToEmpty();
363 }
364 inline const std::string& Battery::name() const {
365  // @@protoc_insertion_point(field_get:ignition.msgs.Battery.name)
366  return _internal_name();
367 }
368 template <typename ArgT0, typename... ArgT>
369 inline PROTOBUF_ALWAYS_INLINE
370 void Battery::set_name(ArgT0&& arg0, ArgT... args) {
371 
372  name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
373  // @@protoc_insertion_point(field_set:ignition.msgs.Battery.name)
374 }
376  std::string* _s = _internal_mutable_name();
377  // @@protoc_insertion_point(field_mutable:ignition.msgs.Battery.name)
378  return _s;
379 }
380 inline const std::string& Battery::_internal_name() const {
381  return name_.Get();
382 }
383 inline void Battery::_internal_set_name(const std::string& value) {
384 
385  name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
386 }
387 inline std::string* Battery::_internal_mutable_name() {
388 
389  return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
390 }
392  // @@protoc_insertion_point(field_release:ignition.msgs.Battery.name)
393  return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
394 }
396  if (name != nullptr) {
397 
398  } else {
399 
400  }
401  name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
402  GetArenaForAllocation());
403 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
404  if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
405  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
406  }
407 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
408  // @@protoc_insertion_point(field_set_allocated:ignition.msgs.Battery.name)
409 }
410 
411 // double voltage = 3;
412 inline void Battery::clear_voltage() {
413  voltage_ = 0;
414 }
415 inline double Battery::_internal_voltage() const {
416  return voltage_;
417 }
418 inline double Battery::voltage() const {
419  // @@protoc_insertion_point(field_get:ignition.msgs.Battery.voltage)
420  return _internal_voltage();
421 }
422 inline void Battery::_internal_set_voltage(double value) {
423 
424  voltage_ = value;
425 }
426 inline void Battery::set_voltage(double value) {
427  _internal_set_voltage(value);
428  // @@protoc_insertion_point(field_set:ignition.msgs.Battery.voltage)
429 }
430 
431 #ifdef __GNUC__
432  #pragma GCC diagnostic pop
433 #endif // __GNUC__
434 
439 // @@protoc_insertion_point(namespace_scope)
440 
441 } // namespace msgs
442 } // namespace ignition
443 
444 #ifdef _MSC_VER
445 #pragma warning(pop)
446 #endif
447 // @@protoc_insertion_point(global_scope)
448 
449 #include <google/protobuf/port_undef.inc>
450 #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_ignition_2fmsgs_2fbattery_2eproto
IGNITION_MSGS_VISIBLEconst ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ignition_2fmsgs_2fbattery_2eproto
Definition: battery.pb.h:84
void set_voltage(double value)
Definition: battery.pb.h:426
static const ::PROTOBUF_NAMESPACE_ID::Reflection * GetReflection()
Definition: battery.pb.h:120
static const Battery * internal_default_instance()
Definition: battery.pb.h:126
bool has_header() const
Definition: battery.pb.h:278
::ignition::msgs::Header * mutable_header()
Definition: battery.pb.h:333
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
PROTOBUF_NODISCARD std::string * release_name()
Definition: battery.pb.h:391
Battery()
Definition: battery.pb.h:86
const std::string & name() const
Definition: battery.pb.h:364
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * descriptor()
Definition: battery.pb.h:114
double voltage() const
Definition: battery.pb.h:418
Battery & operator=(const Battery &from)
Definition: battery.pb.h:96
friend void swap(Battery &a, Battery &b)
Definition: battery.pb.h:133
void clear_name()
Definition: battery.pb.h:361
void MergeFrom(const Battery &from)
static const Battery & default_instance()
Definition: battery.pb.h:123
void Swap(Battery *other)
Definition: battery.pb.h:136
Battery * New(::PROTOBUF_NAMESPACE_ID::Arena *arena=nullptr) const final
Definition: battery.pb.h:157
Battery(Battery &&from) noexcept
Definition: battery.pb.h:91
void unsafe_arena_set_allocated_header(::ignition::msgs::Header *header)
Definition: battery.pb.h:290
void set_name(ArgT0 &&arg0, ArgT... args)
Battery(::PROTOBUF_NAMESPACE_ID::Arena *arena, bool is_message_owned=false)
Battery & operator=(Battery &&from) noexcept
Definition: battery.pb.h:100
Battery(const Battery &from)
void set_allocated_header(::ignition::msgs::Header *header)
Definition: battery.pb.h:338
PROTOBUF_NODISCARD ::ignition::msgs::Header * release_header()
Definition: battery.pb.h:303
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * GetDescriptor()
Definition: battery.pb.h:117
void UnsafeArenaSwap(Battery *other)
Definition: battery.pb.h:149
const ::ignition::msgs::Header & header() const
Definition: battery.pb.h:286
std::string * mutable_name()
Definition: battery.pb.h:375
void clear_voltage()
Definition: battery.pb.h:412
constexpr Battery(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
static const ClassData _class_data_
Definition: battery.pb.h:195
::ignition::msgs::Header * unsafe_arena_release_header()
Definition: battery.pb.h:318
void set_allocated_name(std::string *name)
Definition: battery.pb.h:395
void CopyFrom(const Battery &from)
Definition: header.pb.h:265
std::unique_ptr< const Battery > ConstBatteryUniquePtr
Definition: battery.pb.h:436
std::shared_ptr< Battery > BatterySharedPtr
Definition: battery.pb.h:437
IGNITION_MSGS_VISIBLE HeaderDefaultTypeInternal _Header_default_instance_
std::unique_ptr< Battery > BatteryUniquePtr
Definition: battery.pb.h:435
IGNITION_MSGS_VISIBLE BatteryDefaultTypeInternal _Battery_default_instance_
std::shared_ptr< const Battery > ConstBatterySharedPtr
Definition: battery.pb.h:438
Definition: actor.pb.h:52
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] PROTOBUF_SECTION_VARIABLE(protodesc_cold)