Ignition Msgs

API Reference

8.2.0
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 PROTOBUF_ignition_2fmsgs_2fbattery_2eproto__INCLUDED
5 #define PROTOBUF_ignition_2fmsgs_2fbattery_2eproto__INCLUDED
6 
7 #include <string>
8 
9 #include <google/protobuf/stubs/common.h>
10 
11 #if GOOGLE_PROTOBUF_VERSION < 3000000
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 3000000 < 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/arena.h>
23 #include <google/protobuf/arenastring.h>
24 #include <google/protobuf/generated_message_util.h>
25 #include <google/protobuf/metadata.h>
26 #include <google/protobuf/message.h>
27 #include <google/protobuf/repeated_field.h>
28 #include <google/protobuf/extension_set.h>
29 #include <google/protobuf/unknown_field_set.h>
31 #ifndef _MSC_VER
32 #pragma GCC system_header
33 #else
34 #pragma warning(push)
35 #pragma warning(disable: 4244 4267 4100 4244 4512 4127 4068 4275 4251)
36 #endif
37 #ifdef __linux__
38 #include <sys/sysmacros.h>
39 #endif
40 #include <memory>
41 #include <ignition/msgs/Export.hh>
42 // @@protoc_insertion_point(includes)
43 
44 namespace ignition {
45 namespace msgs {
46 
47 // Internal implementation detail -- do not call these.
48 void IGNITION_MSGS_VISIBLE protobuf_AddDesc_ignition_2fmsgs_2fbattery_2eproto();
51 
52 class Battery;
53 
54 // ===================================================================
55 
56 class IGNITION_MSGS_VISIBLE Battery : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:ignition.msgs.Battery) */ {
57  public:
58  Battery();
59  virtual ~Battery();
60 
61  Battery(const Battery& from);
62 
63  inline Battery& operator=(const Battery& from) {
64  CopyFrom(from);
65  return *this;
66  }
67 
68  static const ::google::protobuf::Descriptor* descriptor();
69  static const Battery& default_instance();
70 
71  void Swap(Battery* other);
72 
73  // implements Message ----------------------------------------------
74 
75  inline Battery* New() const { return New(NULL); }
76 
77  Battery* New(::google::protobuf::Arena* arena) const;
78  void CopyFrom(const ::google::protobuf::Message& from);
79  void MergeFrom(const ::google::protobuf::Message& from);
80  void CopyFrom(const Battery& from);
81  void MergeFrom(const Battery& from);
82  void Clear();
83  bool IsInitialized() const;
84 
85  int ByteSize() const;
86  bool MergePartialFromCodedStream(
87  ::google::protobuf::io::CodedInputStream* input);
88  void SerializeWithCachedSizes(
89  ::google::protobuf::io::CodedOutputStream* output) const;
90  ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
91  bool deterministic, ::google::protobuf::uint8* output) const;
92  ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
93  return InternalSerializeWithCachedSizesToArray(false, output);
94  }
95  int GetCachedSize() const { return _cached_size_; }
96  private:
97  void SharedCtor();
98  void SharedDtor();
99  void SetCachedSize(int size) const;
100  void InternalSwap(Battery* other);
101  private:
102  inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
103  return _internal_metadata_.arena();
104  }
105  inline void* MaybeArenaPtr() const {
106  return _internal_metadata_.raw_arena_ptr();
107  }
108  public:
109 
110  ::google::protobuf::Metadata GetMetadata() const;
111 
112  // nested types ----------------------------------------------------
113 
114  // accessors -------------------------------------------------------
115 
116  // optional .ignition.msgs.Header header = 1;
117  bool has_header() const;
118  void clear_header();
119  static const int kHeaderFieldNumber = 1;
120  const ::ignition::msgs::Header& header() const;
121  ::ignition::msgs::Header* mutable_header();
122  ::ignition::msgs::Header* release_header();
123  void set_allocated_header(::ignition::msgs::Header* header);
124 
125  // optional string name = 2;
126  void clear_name();
127  static const int kNameFieldNumber = 2;
128  const ::std::string& name() const;
129  void set_name(const ::std::string& value);
130  void set_name(const char* value);
131  void set_name(const char* value, size_t size);
132  ::std::string* mutable_name();
133  ::std::string* release_name();
134  void set_allocated_name(::std::string* name);
135 
136  // optional double voltage = 3;
137  void clear_voltage();
138  static const int kVoltageFieldNumber = 3;
139  double voltage() const;
140  void set_voltage(double value);
141 
142  // @@protoc_insertion_point(class_scope:ignition.msgs.Battery)
143  private:
144 
145  ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
146  bool _is_default_instance_;
147  ::ignition::msgs::Header* header_;
148  ::google::protobuf::internal::ArenaStringPtr name_;
149  double voltage_;
150  mutable int _cached_size_;
151  friend void IGNITION_MSGS_VISIBLE protobuf_AddDesc_ignition_2fmsgs_2fbattery_2eproto();
154 
155  void InitAsDefaultInstance();
156  static Battery* default_instance_;
157 };
158 // ===================================================================
159 
160 
161 // ===================================================================
162 
163 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
164 // Battery
165 
166 // optional .ignition.msgs.Header header = 1;
167 inline bool Battery::has_header() const {
168  return !_is_default_instance_ && header_ != NULL;
169 }
170 inline void Battery::clear_header() {
171  if (GetArenaNoVirtual() == NULL && header_ != NULL) delete header_;
172  header_ = NULL;
173 }
174 inline const ::ignition::msgs::Header& Battery::header() const {
175  // @@protoc_insertion_point(field_get:ignition.msgs.Battery.header)
176  return header_ != NULL ? *header_ : *default_instance_->header_;
177 }
178 inline ::ignition::msgs::Header* Battery::mutable_header() {
179 
180  if (header_ == NULL) {
181  header_ = new ::ignition::msgs::Header;
182  }
183  // @@protoc_insertion_point(field_mutable:ignition.msgs.Battery.header)
184  return header_;
185 }
186 inline ::ignition::msgs::Header* Battery::release_header() {
187  // @@protoc_insertion_point(field_release:ignition.msgs.Battery.header)
188 
189  ::ignition::msgs::Header* temp = header_;
190  header_ = NULL;
191  return temp;
192 }
194  delete header_;
195  header_ = header;
196  if (header) {
197 
198  } else {
199 
200  }
201  // @@protoc_insertion_point(field_set_allocated:ignition.msgs.Battery.header)
202 }
203 
204 // optional string name = 2;
205 inline void Battery::clear_name() {
206  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
207 }
208 inline const ::std::string& Battery::name() const {
209  // @@protoc_insertion_point(field_get:ignition.msgs.Battery.name)
210  return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
211 }
212 inline void Battery::set_name(const ::std::string& value) {
213 
214  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
215  // @@protoc_insertion_point(field_set:ignition.msgs.Battery.name)
216 }
217 inline void Battery::set_name(const char* value) {
218 
219  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
220  // @@protoc_insertion_point(field_set_char:ignition.msgs.Battery.name)
221 }
222 inline void Battery::set_name(const char* value, size_t size) {
223 
224  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
225  ::std::string(reinterpret_cast<const char*>(value), size));
226  // @@protoc_insertion_point(field_set_pointer:ignition.msgs.Battery.name)
227 }
228 inline ::std::string* Battery::mutable_name() {
229 
230  // @@protoc_insertion_point(field_mutable:ignition.msgs.Battery.name)
231  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
232 }
233 inline ::std::string* Battery::release_name() {
234  // @@protoc_insertion_point(field_release:ignition.msgs.Battery.name)
235 
236  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
237 }
239  if (name != NULL) {
240 
241  } else {
242 
243  }
244  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
245  // @@protoc_insertion_point(field_set_allocated:ignition.msgs.Battery.name)
246 }
247 
248 // optional double voltage = 3;
249 inline void Battery::clear_voltage() {
250  voltage_ = 0;
251 }
252 inline double Battery::voltage() const {
253  // @@protoc_insertion_point(field_get:ignition.msgs.Battery.voltage)
254  return voltage_;
255 }
256 inline void Battery::set_voltage(double value) {
257 
258  voltage_ = value;
259  // @@protoc_insertion_point(field_set:ignition.msgs.Battery.voltage)
260 }
261 
262 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
263 
268 // @@protoc_insertion_point(namespace_scope)
269 
270 } // namespace msgs
271 } // namespace ignition
272 
273 #ifdef _MSC_VER
274 #pragma warning(pop)
275 #endif
276 // @@protoc_insertion_point(global_scope)
277 
278 #endif // PROTOBUF_ignition_2fmsgs_2fbattery_2eproto__INCLUDED
void IGNITION_MSGS_VISIBLE protobuf_AddDesc_ignition_2fmsgs_2fbattery_2eproto()
void set_voltage(double value)
Definition: battery.pb.h:256
std::unique_ptr< Battery > BatteryUniquePtr
Definition: battery.pb.h:264
std::shared_ptr< Battery > BatterySharedPtr
Definition: battery.pb.h:266
::std::string * release_name()
Definition: battery.pb.h:233
void set_allocated_header(::ignition::msgs::Header *header)
Definition: battery.pb.h:193
int GetCachedSize() const
Definition: battery.pb.h:95
std::unique_ptr< const Battery > ConstBatteryUniquePtr
Definition: battery.pb.h:265
::std::string * mutable_name()
Definition: battery.pb.h:228
Definition: header.pb.h:161
STL class.
std::shared_ptr< const Battery > ConstBatterySharedPtr
Definition: battery.pb.h:267
Battery * New() const
Definition: battery.pb.h:75
void clear_name()
Definition: battery.pb.h:205
const ::ignition::msgs::Header & header() const
Definition: battery.pb.h:174
::google::protobuf::uint8 * SerializeWithCachedSizesToArray(::google::protobuf::uint8 *output) const
Definition: battery.pb.h:92
Definition: battery.pb.h:56
::ignition::msgs::Header * mutable_header()
Definition: battery.pb.h:178
void set_allocated_name(::std::string *name)
Definition: battery.pb.h:238
double voltage() const
Definition: battery.pb.h:252
void clear_voltage()
Definition: battery.pb.h:249
bool has_header() const
Definition: battery.pb.h:167
void protobuf_ShutdownFile_ignition_2fmsgs_2fbattery_2eproto()
::ignition::msgs::Header * release_header()
Definition: battery.pb.h:186
STL class.
void set_name(const ::std::string &value)
Definition: battery.pb.h:212
void protobuf_AssignDesc_ignition_2fmsgs_2fbattery_2eproto()
const ::std::string & name() const
Definition: battery.pb.h:208
void clear_header()
Definition: battery.pb.h:170
Battery & operator=(const Battery &from)
Definition: battery.pb.h:63