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 < 3014000
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 3014000 < 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 ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
66 };
67 extern IGNITION_MSGS_VISIBLE const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ignition_2fmsgs_2fbattery_2eproto;
68 namespace ignition {
69 namespace msgs {
70 class Battery;
71 class 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 PROTOBUF_FINAL :
84  public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:ignition.msgs.Battery) */ {
85  public:
86  inline Battery() : Battery(nullptr) {}
87  virtual ~Battery();
88 
89  Battery(const Battery& from);
90  Battery(Battery&& from) noexcept
91  : Battery() {
92  *this = ::std::move(from);
93  }
94 
95  inline Battery& operator=(const Battery& from) {
96  CopyFrom(from);
97  return *this;
98  }
99  inline Battery& operator=(Battery&& from) noexcept {
100  if (GetArena() == from.GetArena()) {
101  if (this != &from) InternalSwap(&from);
102  } else {
103  CopyFrom(from);
104  }
105  return *this;
106  }
107 
108  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
109  return GetDescriptor();
110  }
111  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
112  return GetMetadataStatic().descriptor;
113  }
114  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
115  return GetMetadataStatic().reflection;
116  }
117  static const Battery& default_instance();
118 
119  static inline const Battery* internal_default_instance() {
120  return reinterpret_cast<const Battery*>(
122  }
123  static constexpr int kIndexInFileMessages =
124  0;
125 
126  friend void swap(Battery& a, Battery& b) {
127  a.Swap(&b);
128  }
129  inline void Swap(Battery* other) {
130  if (other == this) return;
131  if (GetArena() == other->GetArena()) {
132  InternalSwap(other);
133  } else {
134  ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
135  }
136  }
137  void UnsafeArenaSwap(Battery* other) {
138  if (other == this) return;
139  GOOGLE_DCHECK(GetArena() == other->GetArena());
140  InternalSwap(other);
141  }
142 
143  // implements Message ----------------------------------------------
144 
145  inline Battery* New() const final {
146  return CreateMaybeMessage<Battery>(nullptr);
147  }
148 
149  Battery* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
150  return CreateMaybeMessage<Battery>(arena);
151  }
152  void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
153  void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
154  void CopyFrom(const Battery& from);
155  void MergeFrom(const Battery& from);
156  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
157  bool IsInitialized() const final;
158 
159  size_t ByteSizeLong() const final;
160  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
161  ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
162  ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
163  int GetCachedSize() const final { return _cached_size_.Get(); }
164 
165  private:
166  inline void SharedCtor();
167  inline void SharedDtor();
168  void SetCachedSize(int size) const final;
169  void InternalSwap(Battery* other);
170  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
171  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
172  return "ignition.msgs.Battery";
173  }
174  protected:
175  explicit Battery(::PROTOBUF_NAMESPACE_ID::Arena* arena);
176  private:
177  static void ArenaDtor(void* object);
178  inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
179  public:
180 
181  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
182  private:
183  static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
184  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_ignition_2fmsgs_2fbattery_2eproto);
185  return ::descriptor_table_ignition_2fmsgs_2fbattery_2eproto.file_level_metadata[kIndexInFileMessages];
186  }
187 
188  public:
189 
190  // nested types ----------------------------------------------------
191 
192  // accessors -------------------------------------------------------
193 
194  enum : int {
195  kNameFieldNumber = 2,
196  kHeaderFieldNumber = 1,
197  kVoltageFieldNumber = 3,
198  };
199  // string name = 2;
200  void clear_name();
201  const std::string& name() const;
202  void set_name(const std::string& value);
203  void set_name(std::string&& value);
204  void set_name(const char* value);
205  void set_name(const char* value, size_t size);
209  private:
210  const std::string& _internal_name() const;
211  void _internal_set_name(const std::string& value);
212  std::string* _internal_mutable_name();
213  public:
214 
215  // .ignition.msgs.Header header = 1;
216  bool has_header() const;
217  private:
218  bool _internal_has_header() const;
219  public:
220  void clear_header();
221  const ::ignition::msgs::Header& header() const;
222  ::ignition::msgs::Header* release_header();
223  ::ignition::msgs::Header* mutable_header();
224  void set_allocated_header(::ignition::msgs::Header* header);
225  private:
226  const ::ignition::msgs::Header& _internal_header() const;
227  ::ignition::msgs::Header* _internal_mutable_header();
228  public:
230  ::ignition::msgs::Header* header);
231  ::ignition::msgs::Header* unsafe_arena_release_header();
232 
233  // double voltage = 3;
235  double voltage() const;
236  void set_voltage(double value);
237  private:
238  double _internal_voltage() const;
239  void _internal_set_voltage(double value);
240  public:
241 
242  // @@protoc_insertion_point(class_scope:ignition.msgs.Battery)
243  private:
244  class _Internal;
245 
246  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
247  typedef void InternalArenaConstructable_;
248  typedef void DestructorSkippable_;
249  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
250  ::ignition::msgs::Header* header_;
251  double voltage_;
252  mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
253  friend struct ::TableStruct_ignition_2fmsgs_2fbattery_2eproto;
254 };
255 // ===================================================================
256 
257 
258 // ===================================================================
259 
260 #ifdef __GNUC__
261  #pragma GCC diagnostic push
262  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
263 #endif // __GNUC__
264 // Battery
265 
266 // .ignition.msgs.Header header = 1;
267 inline bool Battery::_internal_has_header() const {
268  return this != internal_default_instance() && header_ != nullptr;
269 }
270 inline bool Battery::has_header() const {
271  return _internal_has_header();
272 }
273 inline const ::ignition::msgs::Header& Battery::_internal_header() const {
274  const ::ignition::msgs::Header* p = header_;
275  return p != nullptr ? *p : reinterpret_cast<const ::ignition::msgs::Header&>(
277 }
278 inline const ::ignition::msgs::Header& Battery::header() const {
279  // @@protoc_insertion_point(field_get:ignition.msgs.Battery.header)
280  return _internal_header();
281 }
282 inline void Battery::unsafe_arena_set_allocated_header(
283  ::ignition::msgs::Header* header) {
284  if (GetArena() == nullptr) {
285  delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header_);
286  }
287  header_ = header;
288  if (header) {
289 
290  } else {
291 
292  }
293  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ignition.msgs.Battery.header)
294 }
295 inline ::ignition::msgs::Header* Battery::release_header() {
296 
297  ::ignition::msgs::Header* temp = header_;
298  header_ = nullptr;
299  if (GetArena() != nullptr) {
300  temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
301  }
302  return temp;
303 }
304 inline ::ignition::msgs::Header* Battery::unsafe_arena_release_header() {
305  // @@protoc_insertion_point(field_release:ignition.msgs.Battery.header)
306 
307  ::ignition::msgs::Header* temp = header_;
308  header_ = nullptr;
309  return temp;
310 }
311 inline ::ignition::msgs::Header* Battery::_internal_mutable_header() {
312 
313  if (header_ == nullptr) {
314  auto* p = CreateMaybeMessage<::ignition::msgs::Header>(GetArena());
315  header_ = p;
316  }
317  return header_;
318 }
319 inline ::ignition::msgs::Header* Battery::mutable_header() {
320  // @@protoc_insertion_point(field_mutable:ignition.msgs.Battery.header)
321  return _internal_mutable_header();
322 }
323 inline void Battery::set_allocated_header(::ignition::msgs::Header* header) {
324  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArena();
325  if (message_arena == nullptr) {
326  delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(header_);
327  }
328  if (header) {
329  ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
330  reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(header)->GetArena();
331  if (message_arena != submessage_arena) {
332  header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
333  message_arena, header, submessage_arena);
334  }
335 
336  } else {
337 
338  }
339  header_ = header;
340  // @@protoc_insertion_point(field_set_allocated:ignition.msgs.Battery.header)
341 }
342 
343 // string name = 2;
344 inline void Battery::clear_name() {
345  name_.ClearToEmpty();
346 }
347 inline const std::string& Battery::name() const {
348  // @@protoc_insertion_point(field_get:ignition.msgs.Battery.name)
349  return _internal_name();
350 }
351 inline void Battery::set_name(const std::string& value) {
352  _internal_set_name(value);
353  // @@protoc_insertion_point(field_set:ignition.msgs.Battery.name)
354 }
355 inline std::string* Battery::mutable_name() {
356  // @@protoc_insertion_point(field_mutable:ignition.msgs.Battery.name)
357  return _internal_mutable_name();
358 }
359 inline const std::string& Battery::_internal_name() const {
360  return name_.Get();
361 }
362 inline void Battery::_internal_set_name(const std::string& value) {
363 
364  name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());
365 }
366 inline void Battery::set_name(std::string&& value) {
367 
368  name_.Set(
369  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());
370  // @@protoc_insertion_point(field_set_rvalue:ignition.msgs.Battery.name)
371 }
372 inline void Battery::set_name(const char* value) {
373  GOOGLE_DCHECK(value != nullptr);
374 
375  name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena());
376  // @@protoc_insertion_point(field_set_char:ignition.msgs.Battery.name)
377 }
378 inline void Battery::set_name(const char* value,
379  size_t size) {
380 
381  name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(
382  reinterpret_cast<const char*>(value), size), GetArena());
383  // @@protoc_insertion_point(field_set_pointer:ignition.msgs.Battery.name)
384 }
385 inline std::string* Battery::_internal_mutable_name() {
386 
387  return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());
388 }
389 inline std::string* Battery::release_name() {
390  // @@protoc_insertion_point(field_release:ignition.msgs.Battery.name)
391  return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
392 }
393 inline void Battery::set_allocated_name(std::string* name) {
394  if (name != nullptr) {
395 
396  } else {
397 
398  }
399  name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
400  GetArena());
401  // @@protoc_insertion_point(field_set_allocated:ignition.msgs.Battery.name)
402 }
403 
404 // double voltage = 3;
405 inline void Battery::clear_voltage() {
406  voltage_ = 0;
407 }
408 inline double Battery::_internal_voltage() const {
409  return voltage_;
410 }
411 inline double Battery::voltage() const {
412  // @@protoc_insertion_point(field_get:ignition.msgs.Battery.voltage)
413  return _internal_voltage();
414 }
415 inline void Battery::_internal_set_voltage(double value) {
416 
417  voltage_ = value;
418 }
419 inline void Battery::set_voltage(double value) {
420  _internal_set_voltage(value);
421  // @@protoc_insertion_point(field_set:ignition.msgs.Battery.voltage)
422 }
423 
424 #ifdef __GNUC__
425  #pragma GCC diagnostic pop
426 #endif // __GNUC__
427 
432 // @@protoc_insertion_point(namespace_scope)
433 
434 } // namespace msgs
435 } // namespace ignition
436 
437 #ifdef _MSC_VER
438 #pragma warning(pop)
439 #endif
440 // @@protoc_insertion_point(global_scope)
441 
442 #include <google/protobuf/port_undef.inc>
443 #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
Battery * New() const final
Definition: battery.pb.h:145
void set_voltage(double value)
static const ::PROTOBUF_NAMESPACE_ID::Reflection * GetReflection()
Definition: battery.pb.h:114
static const Battery * internal_default_instance()
Definition: battery.pb.h:119
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
::ignition::msgs::Header * release_header()
void set_name(const char *value, size_t size)
Battery()
Definition: battery.pb.h:86
::ignition::msgs::Header * mutable_header()
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * descriptor()
Definition: battery.pb.h:108
void set_name(const std::string &value)
Battery & operator=(const Battery &from)
Definition: battery.pb.h:95
friend void swap(Battery &a, Battery &b)
Definition: battery.pb.h:126
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final
void MergeFrom(const Battery &from)
static const Battery & default_instance()
void Swap(Battery *other)
Definition: battery.pb.h:129
Battery * New(::PROTOBUF_NAMESPACE_ID::Arena *arena) const final
Definition: battery.pb.h:149
Battery(Battery &&from) noexcept
Definition: battery.pb.h:90
void unsafe_arena_set_allocated_header(::ignition::msgs::Header *header)
Battery & operator=(Battery &&from) noexcept
Definition: battery.pb.h:99
Battery(const Battery &from)
::ignition::msgs::Header * unsafe_arena_release_header()
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final
void set_allocated_header(::ignition::msgs::Header *header)
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
static const ::PROTOBUF_NAMESPACE_ID::Descriptor * GetDescriptor()
Definition: battery.pb.h:111
Battery(::PROTOBUF_NAMESPACE_ID::Arena *arena)
void UnsafeArenaSwap(Battery *other)
Definition: battery.pb.h:137
const std::string & name() const
void set_name(const char *value)
void set_name(std::string &&value)
void set_allocated_name(std::string *name)
void CopyFrom(const Battery &from)
const ::ignition::msgs::Header & header() const
std::unique_ptr< const Battery > ConstBatteryUniquePtr
Definition: battery.pb.h:429
std::shared_ptr< Battery > BatterySharedPtr
Definition: battery.pb.h:430
IGNITION_MSGS_VISIBLE HeaderDefaultTypeInternal _Header_default_instance_
std::unique_ptr< Battery > BatteryUniquePtr
Definition: battery.pb.h:428
IGNITION_MSGS_VISIBLE BatteryDefaultTypeInternal _Battery_default_instance_
std::shared_ptr< const Battery > ConstBatterySharedPtr
Definition: battery.pb.h:431
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)