BWAPI
|
00001 // Generated by the protocol buffer compiler. DO NOT EDIT! 00002 // source: draw.proto 00003 00004 #ifndef PROTOBUF_draw_2eproto__INCLUDED 00005 #define PROTOBUF_draw_2eproto__INCLUDED 00006 00007 #include <string> 00008 00009 #include <google/protobuf/stubs/common.h> 00010 00011 #if GOOGLE_PROTOBUF_VERSION < 2003000 00012 #error This file was generated by a newer version of protoc which is 00013 #error incompatible with your Protocol Buffer headers. Please update 00014 #error your headers. 00015 #endif 00016 #if 2003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION 00017 #error This file was generated by an older version of protoc which is 00018 #error incompatible with your Protocol Buffer headers. Please 00019 #error regenerate this file with a newer version of protoc. 00020 #endif 00021 00022 #include <google/protobuf/generated_message_util.h> 00023 #include <google/protobuf/repeated_field.h> 00024 #include <google/protobuf/extension_set.h> 00025 #include <google/protobuf/generated_message_reflection.h> 00026 // @@protoc_insertion_point(includes) 00027 00028 namespace messages { 00029 00030 // Internal implementation detail -- do not call these. 00031 void protobuf_AddDesc_draw_2eproto(); 00032 void protobuf_AssignDesc_draw_2eproto(); 00033 void protobuf_ShutdownFile_draw_2eproto(); 00034 00035 class Color; 00036 class DrawCommand; 00037 00038 enum ShapeType { 00039 setTextSize = 1, 00040 text = 2, 00041 box = 3, 00042 circle = 4, 00043 ellipse = 5, 00044 dot = 6, 00045 line = 7, 00046 triangle = 8 00047 }; 00048 bool ShapeType_IsValid(int value); 00049 const ShapeType ShapeType_MIN = setTextSize; 00050 const ShapeType ShapeType_MAX = triangle; 00051 const int ShapeType_ARRAYSIZE = ShapeType_MAX + 1; 00052 00053 const ::google::protobuf::EnumDescriptor* ShapeType_descriptor(); 00054 inline const ::std::string& ShapeType_Name(ShapeType value) { 00055 return ::google::protobuf::internal::NameOfEnum( 00056 ShapeType_descriptor(), value); 00057 } 00058 inline bool ShapeType_Parse( 00059 const ::std::string& name, ShapeType* value) { 00060 return ::google::protobuf::internal::ParseNamedEnum<ShapeType>( 00061 ShapeType_descriptor(), name, value); 00062 } 00063 enum CoordinateType { 00064 screen = 1, 00065 map = 2, 00066 mouse = 3 00067 }; 00068 bool CoordinateType_IsValid(int value); 00069 const CoordinateType CoordinateType_MIN = screen; 00070 const CoordinateType CoordinateType_MAX = mouse; 00071 const int CoordinateType_ARRAYSIZE = CoordinateType_MAX + 1; 00072 00073 const ::google::protobuf::EnumDescriptor* CoordinateType_descriptor(); 00074 inline const ::std::string& CoordinateType_Name(CoordinateType value) { 00075 return ::google::protobuf::internal::NameOfEnum( 00076 CoordinateType_descriptor(), value); 00077 } 00078 inline bool CoordinateType_Parse( 00079 const ::std::string& name, CoordinateType* value) { 00080 return ::google::protobuf::internal::ParseNamedEnum<CoordinateType>( 00081 CoordinateType_descriptor(), name, value); 00082 } 00083 // =================================================================== 00084 00085 class Color : public ::google::protobuf::Message { 00086 public: 00087 Color(); 00088 virtual ~Color(); 00089 00090 Color(const Color& from); 00091 00092 inline Color& operator=(const Color& from) { 00093 CopyFrom(from); 00094 return *this; 00095 } 00096 00097 inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { 00098 return _unknown_fields_; 00099 } 00100 00101 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { 00102 return &_unknown_fields_; 00103 } 00104 00105 static const ::google::protobuf::Descriptor* descriptor(); 00106 static const Color& default_instance(); 00107 00108 void Swap(Color* other); 00109 00110 // implements Message ---------------------------------------------- 00111 00112 Color* New() const; 00113 void CopyFrom(const ::google::protobuf::Message& from); 00114 void MergeFrom(const ::google::protobuf::Message& from); 00115 void CopyFrom(const Color& from); 00116 void MergeFrom(const Color& from); 00117 void Clear(); 00118 bool IsInitialized() const; 00119 00120 int ByteSize() const; 00121 bool MergePartialFromCodedStream( 00122 ::google::protobuf::io::CodedInputStream* input); 00123 void SerializeWithCachedSizes( 00124 ::google::protobuf::io::CodedOutputStream* output) const; 00125 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; 00126 int GetCachedSize() const { return _cached_size_; } 00127 private: 00128 void SharedCtor(); 00129 void SharedDtor(); 00130 void SetCachedSize(int size) const; 00131 public: 00132 00133 ::google::protobuf::Metadata GetMetadata() const; 00134 00135 // nested types ---------------------------------------------------- 00136 00137 // accessors ------------------------------------------------------- 00138 00139 // optional int32 id = 1; 00140 inline bool has_id() const; 00141 inline void clear_id(); 00142 static const int kIdFieldNumber = 1; 00143 inline ::google::protobuf::int32 id() const; 00144 inline void set_id(::google::protobuf::int32 value); 00145 00146 // optional int32 red = 2; 00147 inline bool has_red() const; 00148 inline void clear_red(); 00149 static const int kRedFieldNumber = 2; 00150 inline ::google::protobuf::int32 red() const; 00151 inline void set_red(::google::protobuf::int32 value); 00152 00153 // optional int32 green = 3; 00154 inline bool has_green() const; 00155 inline void clear_green(); 00156 static const int kGreenFieldNumber = 3; 00157 inline ::google::protobuf::int32 green() const; 00158 inline void set_green(::google::protobuf::int32 value); 00159 00160 // optional int32 blue = 4; 00161 inline bool has_blue() const; 00162 inline void clear_blue(); 00163 static const int kBlueFieldNumber = 4; 00164 inline ::google::protobuf::int32 blue() const; 00165 inline void set_blue(::google::protobuf::int32 value); 00166 00167 // @@protoc_insertion_point(class_scope:messages.Color) 00168 private: 00169 ::google::protobuf::UnknownFieldSet _unknown_fields_; 00170 mutable int _cached_size_; 00171 00172 ::google::protobuf::int32 id_; 00173 ::google::protobuf::int32 red_; 00174 ::google::protobuf::int32 green_; 00175 ::google::protobuf::int32 blue_; 00176 friend void protobuf_AddDesc_draw_2eproto(); 00177 friend void protobuf_AssignDesc_draw_2eproto(); 00178 friend void protobuf_ShutdownFile_draw_2eproto(); 00179 00180 ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32]; 00181 00182 // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? 00183 inline bool _has_bit(int index) const { 00184 return (_has_bits_[index / 32] & (1u << (index % 32))) != 0; 00185 } 00186 inline void _set_bit(int index) { 00187 _has_bits_[index / 32] |= (1u << (index % 32)); 00188 } 00189 inline void _clear_bit(int index) { 00190 _has_bits_[index / 32] &= ~(1u << (index % 32)); 00191 } 00192 00193 void InitAsDefaultInstance(); 00194 static Color* default_instance_; 00195 }; 00196 // ------------------------------------------------------------------- 00197 00198 class DrawCommand : public ::google::protobuf::Message { 00199 public: 00200 DrawCommand(); 00201 virtual ~DrawCommand(); 00202 00203 DrawCommand(const DrawCommand& from); 00204 00205 inline DrawCommand& operator=(const DrawCommand& from) { 00206 CopyFrom(from); 00207 return *this; 00208 } 00209 00210 inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { 00211 return _unknown_fields_; 00212 } 00213 00214 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { 00215 return &_unknown_fields_; 00216 } 00217 00218 static const ::google::protobuf::Descriptor* descriptor(); 00219 static const DrawCommand& default_instance(); 00220 00221 void Swap(DrawCommand* other); 00222 00223 // implements Message ---------------------------------------------- 00224 00225 DrawCommand* New() const; 00226 void CopyFrom(const ::google::protobuf::Message& from); 00227 void MergeFrom(const ::google::protobuf::Message& from); 00228 void CopyFrom(const DrawCommand& from); 00229 void MergeFrom(const DrawCommand& from); 00230 void Clear(); 00231 bool IsInitialized() const; 00232 00233 int ByteSize() const; 00234 bool MergePartialFromCodedStream( 00235 ::google::protobuf::io::CodedInputStream* input); 00236 void SerializeWithCachedSizes( 00237 ::google::protobuf::io::CodedOutputStream* output) const; 00238 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; 00239 int GetCachedSize() const { return _cached_size_; } 00240 private: 00241 void SharedCtor(); 00242 void SharedDtor(); 00243 void SetCachedSize(int size) const; 00244 public: 00245 00246 ::google::protobuf::Metadata GetMetadata() const; 00247 00248 // nested types ---------------------------------------------------- 00249 00250 // accessors ------------------------------------------------------- 00251 00252 // required .messages.ShapeType shape = 1; 00253 inline bool has_shape() const; 00254 inline void clear_shape(); 00255 static const int kShapeFieldNumber = 1; 00256 inline messages::ShapeType shape() const; 00257 inline void set_shape(messages::ShapeType value); 00258 00259 // optional .messages.CoordinateType coordinateType = 2; 00260 inline bool has_coordinatetype() const; 00261 inline void clear_coordinatetype(); 00262 static const int kCoordinateTypeFieldNumber = 2; 00263 inline messages::CoordinateType coordinatetype() const; 00264 inline void set_coordinatetype(messages::CoordinateType value); 00265 00266 // repeated int32 coordinates = 3; 00267 inline int coordinates_size() const; 00268 inline void clear_coordinates(); 00269 static const int kCoordinatesFieldNumber = 3; 00270 inline ::google::protobuf::int32 coordinates(int index) const; 00271 inline void set_coordinates(int index, ::google::protobuf::int32 value); 00272 inline void add_coordinates(::google::protobuf::int32 value); 00273 inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& 00274 coordinates() const; 00275 inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* 00276 mutable_coordinates(); 00277 00278 // optional .messages.Color color = 4; 00279 inline bool has_color() const; 00280 inline void clear_color(); 00281 static const int kColorFieldNumber = 4; 00282 inline const ::messages::Color& color() const; 00283 inline ::messages::Color* mutable_color(); 00284 00285 // optional bool isSolid = 5; 00286 inline bool has_issolid() const; 00287 inline void clear_issolid(); 00288 static const int kIsSolidFieldNumber = 5; 00289 inline bool issolid() const; 00290 inline void set_issolid(bool value); 00291 00292 // optional string text = 6; 00293 inline bool has_text() const; 00294 inline void clear_text(); 00295 static const int kTextFieldNumber = 6; 00296 inline const ::std::string& text() const; 00297 inline void set_text(const ::std::string& value); 00298 inline void set_text(const char* value); 00299 inline void set_text(const char* value, size_t size); 00300 inline ::std::string* mutable_text(); 00301 00302 // @@protoc_insertion_point(class_scope:messages.DrawCommand) 00303 private: 00304 ::google::protobuf::UnknownFieldSet _unknown_fields_; 00305 mutable int _cached_size_; 00306 00307 int shape_; 00308 int coordinatetype_; 00309 ::google::protobuf::RepeatedField< ::google::protobuf::int32 > coordinates_; 00310 ::messages::Color* color_; 00311 bool issolid_; 00312 ::std::string* text_; 00313 static const ::std::string _default_text_; 00314 friend void protobuf_AddDesc_draw_2eproto(); 00315 friend void protobuf_AssignDesc_draw_2eproto(); 00316 friend void protobuf_ShutdownFile_draw_2eproto(); 00317 00318 ::google::protobuf::uint32 _has_bits_[(6 + 31) / 32]; 00319 00320 // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? 00321 inline bool _has_bit(int index) const { 00322 return (_has_bits_[index / 32] & (1u << (index % 32))) != 0; 00323 } 00324 inline void _set_bit(int index) { 00325 _has_bits_[index / 32] |= (1u << (index % 32)); 00326 } 00327 inline void _clear_bit(int index) { 00328 _has_bits_[index / 32] &= ~(1u << (index % 32)); 00329 } 00330 00331 void InitAsDefaultInstance(); 00332 static DrawCommand* default_instance_; 00333 }; 00334 // =================================================================== 00335 00336 00337 // =================================================================== 00338 00339 // Color 00340 00341 // optional int32 id = 1; 00342 inline bool Color::has_id() const { 00343 return _has_bit(0); 00344 } 00345 inline void Color::clear_id() { 00346 id_ = 0; 00347 _clear_bit(0); 00348 } 00349 inline ::google::protobuf::int32 Color::id() const { 00350 return id_; 00351 } 00352 inline void Color::set_id(::google::protobuf::int32 value) { 00353 _set_bit(0); 00354 id_ = value; 00355 } 00356 00357 // optional int32 red = 2; 00358 inline bool Color::has_red() const { 00359 return _has_bit(1); 00360 } 00361 inline void Color::clear_red() { 00362 red_ = 0; 00363 _clear_bit(1); 00364 } 00365 inline ::google::protobuf::int32 Color::red() const { 00366 return red_; 00367 } 00368 inline void Color::set_red(::google::protobuf::int32 value) { 00369 _set_bit(1); 00370 red_ = value; 00371 } 00372 00373 // optional int32 green = 3; 00374 inline bool Color::has_green() const { 00375 return _has_bit(2); 00376 } 00377 inline void Color::clear_green() { 00378 green_ = 0; 00379 _clear_bit(2); 00380 } 00381 inline ::google::protobuf::int32 Color::green() const { 00382 return green_; 00383 } 00384 inline void Color::set_green(::google::protobuf::int32 value) { 00385 _set_bit(2); 00386 green_ = value; 00387 } 00388 00389 // optional int32 blue = 4; 00390 inline bool Color::has_blue() const { 00391 return _has_bit(3); 00392 } 00393 inline void Color::clear_blue() { 00394 blue_ = 0; 00395 _clear_bit(3); 00396 } 00397 inline ::google::protobuf::int32 Color::blue() const { 00398 return blue_; 00399 } 00400 inline void Color::set_blue(::google::protobuf::int32 value) { 00401 _set_bit(3); 00402 blue_ = value; 00403 } 00404 00405 // ------------------------------------------------------------------- 00406 00407 // DrawCommand 00408 00409 // required .messages.ShapeType shape = 1; 00410 inline bool DrawCommand::has_shape() const { 00411 return _has_bit(0); 00412 } 00413 inline void DrawCommand::clear_shape() { 00414 shape_ = 1; 00415 _clear_bit(0); 00416 } 00417 inline messages::ShapeType DrawCommand::shape() const { 00418 return static_cast< messages::ShapeType >(shape_); 00419 } 00420 inline void DrawCommand::set_shape(messages::ShapeType value) { 00421 GOOGLE_DCHECK(messages::ShapeType_IsValid(value)); 00422 _set_bit(0); 00423 shape_ = value; 00424 } 00425 00426 // optional .messages.CoordinateType coordinateType = 2; 00427 inline bool DrawCommand::has_coordinatetype() const { 00428 return _has_bit(1); 00429 } 00430 inline void DrawCommand::clear_coordinatetype() { 00431 coordinatetype_ = 1; 00432 _clear_bit(1); 00433 } 00434 inline messages::CoordinateType DrawCommand::coordinatetype() const { 00435 return static_cast< messages::CoordinateType >(coordinatetype_); 00436 } 00437 inline void DrawCommand::set_coordinatetype(messages::CoordinateType value) { 00438 GOOGLE_DCHECK(messages::CoordinateType_IsValid(value)); 00439 _set_bit(1); 00440 coordinatetype_ = value; 00441 } 00442 00443 // repeated int32 coordinates = 3; 00444 inline int DrawCommand::coordinates_size() const { 00445 return coordinates_.size(); 00446 } 00447 inline void DrawCommand::clear_coordinates() { 00448 coordinates_.Clear(); 00449 } 00450 inline ::google::protobuf::int32 DrawCommand::coordinates(int index) const { 00451 return coordinates_.Get(index); 00452 } 00453 inline void DrawCommand::set_coordinates(int index, ::google::protobuf::int32 value) { 00454 coordinates_.Set(index, value); 00455 } 00456 inline void DrawCommand::add_coordinates(::google::protobuf::int32 value) { 00457 coordinates_.Add(value); 00458 } 00459 inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& 00460 DrawCommand::coordinates() const { 00461 return coordinates_; 00462 } 00463 inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* 00464 DrawCommand::mutable_coordinates() { 00465 return &coordinates_; 00466 } 00467 00468 // optional .messages.Color color = 4; 00469 inline bool DrawCommand::has_color() const { 00470 return _has_bit(3); 00471 } 00472 inline void DrawCommand::clear_color() { 00473 if (color_ != NULL) color_->::messages::Color::Clear(); 00474 _clear_bit(3); 00475 } 00476 inline const ::messages::Color& DrawCommand::color() const { 00477 return color_ != NULL ? *color_ : *default_instance_->color_; 00478 } 00479 inline ::messages::Color* DrawCommand::mutable_color() { 00480 _set_bit(3); 00481 if (color_ == NULL) color_ = new ::messages::Color; 00482 return color_; 00483 } 00484 00485 // optional bool isSolid = 5; 00486 inline bool DrawCommand::has_issolid() const { 00487 return _has_bit(4); 00488 } 00489 inline void DrawCommand::clear_issolid() { 00490 issolid_ = false; 00491 _clear_bit(4); 00492 } 00493 inline bool DrawCommand::issolid() const { 00494 return issolid_; 00495 } 00496 inline void DrawCommand::set_issolid(bool value) { 00497 _set_bit(4); 00498 issolid_ = value; 00499 } 00500 00501 // optional string text = 6; 00502 inline bool DrawCommand::has_text() const { 00503 return _has_bit(5); 00504 } 00505 inline void DrawCommand::clear_text() { 00506 if (text_ != &_default_text_) { 00507 text_->clear(); 00508 } 00509 _clear_bit(5); 00510 } 00511 inline const ::std::string& DrawCommand::text() const { 00512 return *text_; 00513 } 00514 inline void DrawCommand::set_text(const ::std::string& value) { 00515 _set_bit(5); 00516 if (text_ == &_default_text_) { 00517 text_ = new ::std::string; 00518 } 00519 text_->assign(value); 00520 } 00521 inline void DrawCommand::set_text(const char* value) { 00522 _set_bit(5); 00523 if (text_ == &_default_text_) { 00524 text_ = new ::std::string; 00525 } 00526 text_->assign(value); 00527 } 00528 inline void DrawCommand::set_text(const char* value, size_t size) { 00529 _set_bit(5); 00530 if (text_ == &_default_text_) { 00531 text_ = new ::std::string; 00532 } 00533 text_->assign(reinterpret_cast<const char*>(value), size); 00534 } 00535 inline ::std::string* DrawCommand::mutable_text() { 00536 _set_bit(5); 00537 if (text_ == &_default_text_) { 00538 text_ = new ::std::string; 00539 } 00540 return text_; 00541 } 00542 00543 00544 // @@protoc_insertion_point(namespace_scope) 00545 00546 } // namespace messages 00547 00548 #ifndef SWIG 00549 namespace google { 00550 namespace protobuf { 00551 00552 template <> 00553 inline const EnumDescriptor* GetEnumDescriptor< messages::ShapeType>() { 00554 return messages::ShapeType_descriptor(); 00555 } 00556 template <> 00557 inline const EnumDescriptor* GetEnumDescriptor< messages::CoordinateType>() { 00558 return messages::CoordinateType_descriptor(); 00559 } 00560 00561 } // namespace google 00562 } // namespace protobuf 00563 #endif // SWIG 00564 00565 // @@protoc_insertion_point(global_scope) 00566 00567 #endif // PROTOBUF_draw_2eproto__INCLUDED