Gazebo Msgs

API Reference

9.5.1
battery.pb.h
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: gz/msgs/battery.proto
3 
4 #ifndef PROTOBUF_INCLUDED_gz_2fmsgs_2fbattery_2eproto
5 #define PROTOBUF_INCLUDED_gz_2fmsgs_2fbattery_2eproto
6 
7 #include <string>
8 
9 #include <google/protobuf/stubs/common.h>
10 
11 #if GOOGLE_PROTOBUF_VERSION < 3006001
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 3006001 < GOOGLE_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/io/coded_stream.h>
23 #include <google/protobuf/arena.h>
24 #include <google/protobuf/arenastring.h>
25 #include <google/protobuf/generated_message_table_driven.h>
26 #include <google/protobuf/generated_message_util.h>
27 #include <google/protobuf/inlined_string_field.h>
28 #include <google/protobuf/metadata.h>
29 #include <google/protobuf/message.h>
30 #include <google/protobuf/repeated_field.h> // IWYU pragma: export
31 #include <google/protobuf/extension_set.h> // IWYU pragma: export
32 #include <google/protobuf/unknown_field_set.h>
33 #include "gz/msgs/header.pb.h"
34 // @@protoc_insertion_point(includes)
35 #define PROTOBUF_INTERNAL_EXPORT_protobuf_gz_2fmsgs_2fbattery_2eproto GZ_MSGS_VISIBLE
36 
38 // Internal implementation detail -- do not use these members.
39 struct GZ_MSGS_VISIBLE TableStruct {
40  static const ::google::protobuf::internal::ParseTableField entries[];
41  static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
42  static const ::google::protobuf::internal::ParseTable schema[1];
43  static const ::google::protobuf::internal::FieldMetadata field_metadata[];
44  static const ::google::protobuf::internal::SerializationTable serialization_table[];
45  static const ::google::protobuf::uint32 offsets[];
46 };
47 void GZ_MSGS_VISIBLE AddDescriptors();
48 } // namespace protobuf_gz_2fmsgs_2fbattery_2eproto
49 namespace gz {
50 namespace msgs {
51 class Battery;
52 class BatteryDefaultTypeInternal;
53 GZ_MSGS_VISIBLE extern BatteryDefaultTypeInternal _Battery_default_instance_;
54 } // namespace msgs
55 } // namespace gz
56 namespace google {
57 namespace protobuf {
58 template<> GZ_MSGS_VISIBLE ::gz::msgs::Battery* Arena::CreateMaybeMessage<::gz::msgs::Battery>(Arena*);
59 } // namespace protobuf
60 } // namespace google
61 namespace gz {
62 namespace msgs {
63 
64 // ===================================================================
65 
66 class GZ_MSGS_VISIBLE Battery : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:gz.msgs.Battery) */ {
67  public:
68  Battery();
69  virtual ~Battery();
70 
71  Battery(const Battery& from);
72 
73  inline Battery& operator=(const Battery& from) {
74  CopyFrom(from);
75  return *this;
76  }
77  #if LANG_CXX11
78  Battery(Battery&& from) noexcept
79  : Battery() {
80  *this = ::std::move(from);
81  }
82 
83  inline Battery& operator=(Battery&& from) noexcept {
84  if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
85  if (this != &from) InternalSwap(&from);
86  } else {
87  CopyFrom(from);
88  }
89  return *this;
90  }
91  #endif
92  static const ::google::protobuf::Descriptor* descriptor();
93  static const Battery& default_instance();
94 
95  static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
96  static inline const Battery* internal_default_instance() {
97  return reinterpret_cast<const Battery*>(
99  }
100  static constexpr int kIndexInFileMessages =
101  0;
102 
103  void Swap(Battery* other);
104  friend void swap(Battery& a, Battery& b) {
105  a.Swap(&b);
106  }
107 
108  // implements Message ----------------------------------------------
109 
110  inline Battery* New() const final {
111  return CreateMaybeMessage<Battery>(NULL);
112  }
113 
114  Battery* New(::google::protobuf::Arena* arena) const final {
115  return CreateMaybeMessage<Battery>(arena);
116  }
117  void CopyFrom(const ::google::protobuf::Message& from) final;
118  void MergeFrom(const ::google::protobuf::Message& from) final;
119  void CopyFrom(const Battery& from);
120  void MergeFrom(const Battery& from);
121  void Clear() final;
122  bool IsInitialized() const final;
123 
124  size_t ByteSizeLong() const final;
125  bool MergePartialFromCodedStream(
126  ::google::protobuf::io::CodedInputStream* input) final;
127  void SerializeWithCachedSizes(
128  ::google::protobuf::io::CodedOutputStream* output) const final;
129  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
130  bool deterministic, ::google::protobuf::uint8* target) const final;
131  int GetCachedSize() const final { return _cached_size_.Get(); }
132 
133  private:
134  void SharedCtor();
135  void SharedDtor();
136  void SetCachedSize(int size) const final;
137  void InternalSwap(Battery* other);
138  private:
139  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
140  return NULL;
141  }
142  inline void* MaybeArenaPtr() const {
143  return NULL;
144  }
145  public:
146 
147  ::google::protobuf::Metadata GetMetadata() const final;
148 
149  // nested types ----------------------------------------------------
150 
151  // accessors -------------------------------------------------------
152 
153  // string name = 2;
154  void clear_name();
155  static const int kNameFieldNumber = 2;
156  const ::std::string& name() const;
157  void set_name(const ::std::string& value);
158  #if LANG_CXX11
159  void set_name(::std::string&& value);
160  #endif
161  void set_name(const char* value);
162  void set_name(const char* value, size_t size);
163  ::std::string* mutable_name();
164  ::std::string* release_name();
165  void set_allocated_name(::std::string* name);
166 
167  // .gz.msgs.Header header = 1;
168  bool has_header() const;
169  void clear_header();
170  static const int kHeaderFieldNumber = 1;
171  private:
172  const ::gz::msgs::Header& _internal_header() const;
173  public:
174  const ::gz::msgs::Header& header() const;
175  ::gz::msgs::Header* release_header();
176  ::gz::msgs::Header* mutable_header();
177  void set_allocated_header(::gz::msgs::Header* header);
178 
179  // double voltage = 3;
180  void clear_voltage();
181  static const int kVoltageFieldNumber = 3;
182  double voltage() const;
183  void set_voltage(double value);
184 
185  // @@protoc_insertion_point(class_scope:gz.msgs.Battery)
186  private:
187 
188  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
189  ::google::protobuf::internal::ArenaStringPtr name_;
190  ::gz::msgs::Header* header_;
191  double voltage_;
192  mutable ::google::protobuf::internal::CachedSize _cached_size_;
193  friend struct ::protobuf_gz_2fmsgs_2fbattery_2eproto::TableStruct;
194 };
195 // ===================================================================
196 
197 
198 // ===================================================================
199 
200 #ifdef __GNUC__
201  #pragma GCC diagnostic push
202  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
203 #endif // __GNUC__
204 // Battery
205 
206 // .gz.msgs.Header header = 1;
207 inline bool Battery::has_header() const {
208  return this != internal_default_instance() && header_ != NULL;
209 }
210 inline const ::gz::msgs::Header& Battery::_internal_header() const {
211  return *header_;
212 }
213 inline const ::gz::msgs::Header& Battery::header() const {
214  const ::gz::msgs::Header* p = header_;
215  // @@protoc_insertion_point(field_get:gz.msgs.Battery.header)
216  return p != NULL ? *p : *reinterpret_cast<const ::gz::msgs::Header*>(
218 }
219 inline ::gz::msgs::Header* Battery::release_header() {
220  // @@protoc_insertion_point(field_release:gz.msgs.Battery.header)
221 
222  ::gz::msgs::Header* temp = header_;
223  header_ = NULL;
224  return temp;
225 }
226 inline ::gz::msgs::Header* Battery::mutable_header() {
227 
228  if (header_ == NULL) {
229  auto* p = CreateMaybeMessage<::gz::msgs::Header>(GetArenaNoVirtual());
230  header_ = p;
231  }
232  // @@protoc_insertion_point(field_mutable:gz.msgs.Battery.header)
233  return header_;
234 }
236  ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
237  if (message_arena == NULL) {
238  delete reinterpret_cast< ::google::protobuf::MessageLite*>(header_);
239  }
240  if (header) {
241  ::google::protobuf::Arena* submessage_arena = NULL;
242  if (message_arena != submessage_arena) {
243  header = ::google::protobuf::internal::GetOwnedMessage(
244  message_arena, header, submessage_arena);
245  }
246 
247  } else {
248 
249  }
250  header_ = header;
251  // @@protoc_insertion_point(field_set_allocated:gz.msgs.Battery.header)
252 }
253 
254 // string name = 2;
255 inline void Battery::clear_name() {
256  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
257 }
258 inline const ::std::string& Battery::name() const {
259  // @@protoc_insertion_point(field_get:gz.msgs.Battery.name)
260  return name_.GetNoArena();
261 }
262 inline void Battery::set_name(const ::std::string& value) {
263 
264  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
265  // @@protoc_insertion_point(field_set:gz.msgs.Battery.name)
266 }
267 #if LANG_CXX11
268 inline void Battery::set_name(::std::string&& value) {
269 
270  name_.SetNoArena(
271  &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
272  // @@protoc_insertion_point(field_set_rvalue:gz.msgs.Battery.name)
273 }
274 #endif
275 inline void Battery::set_name(const char* value) {
276  GOOGLE_DCHECK(value != NULL);
277 
278  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
279  // @@protoc_insertion_point(field_set_char:gz.msgs.Battery.name)
280 }
281 inline void Battery::set_name(const char* value, size_t size) {
282 
283  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
284  ::std::string(reinterpret_cast<const char*>(value), size));
285  // @@protoc_insertion_point(field_set_pointer:gz.msgs.Battery.name)
286 }
287 inline ::std::string* Battery::mutable_name() {
288 
289  // @@protoc_insertion_point(field_mutable:gz.msgs.Battery.name)
290  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
291 }
292 inline ::std::string* Battery::release_name() {
293  // @@protoc_insertion_point(field_release:gz.msgs.Battery.name)
294 
295  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
296 }
298  if (name != NULL) {
299 
300  } else {
301 
302  }
303  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
304  // @@protoc_insertion_point(field_set_allocated:gz.msgs.Battery.name)
305 }
306 
307 // double voltage = 3;
308 inline void Battery::clear_voltage() {
309  voltage_ = 0;
310 }
311 inline double Battery::voltage() const {
312  // @@protoc_insertion_point(field_get:gz.msgs.Battery.voltage)
313  return voltage_;
314 }
315 inline void Battery::set_voltage(double value) {
316 
317  voltage_ = value;
318  // @@protoc_insertion_point(field_set:gz.msgs.Battery.voltage)
319 }
320 
321 #ifdef __GNUC__
322  #pragma GCC diagnostic pop
323 #endif // __GNUC__
324 
325 // @@protoc_insertion_point(namespace_scope)
326 
327 } // namespace msgs
328 } // namespace gz
329 
330 // @@protoc_insertion_point(global_scope)
331 
332 #endif // PROTOBUF_INCLUDED_gz_2fmsgs_2fbattery_2eproto