BWAPI
|
00001 // Generated by the protocol buffer compiler. DO NOT EDIT! 00002 // source: command.proto 00003 00004 #ifndef PROTOBUF_command_2eproto__INCLUDED 00005 #define PROTOBUF_command_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 #include "unit.pb.h" 00027 #include "types.pb.h" 00028 // @@protoc_insertion_point(includes) 00029 00030 namespace messages { 00031 00032 // Internal implementation detail -- do not call these. 00033 void protobuf_AddDesc_command_2eproto(); 00034 void protobuf_AssignDesc_command_2eproto(); 00035 void protobuf_ShutdownFile_command_2eproto(); 00036 00037 class Command; 00038 00039 enum CommandType { 00040 none = 1, 00041 attackMove = 2, 00042 attackUnit = 3, 00043 rightClick = 4, 00044 rightClickUnit = 5, 00045 train = 6, 00046 build = 7, 00047 buildAddon = 8, 00048 research = 9, 00049 upgrade = 10, 00050 stop = 11, 00051 holdPosition = 12, 00052 patrol = 13, 00053 follow = 14, 00054 setRallyPosition = 15, 00055 setRallyUnit = 16, 00056 repair = 17, 00057 morph = 18, 00058 burrow = 19, 00059 unburrow = 20, 00060 siege = 21, 00061 unsiege = 22, 00062 cloak = 23, 00063 decloak = 24, 00064 lift = 25, 00065 land = 26, 00066 load = 27, 00067 unload = 28, 00068 unloadAll = 29, 00069 unloadAllPosition = 30, 00070 cancelConstruction = 31, 00071 haltConstruction = 32, 00072 cancelMorph = 33, 00073 cancelTrain = 34, 00074 cancelTrainSlot = 35, 00075 cancelAddon = 36, 00076 cancelResearch = 37, 00077 cancelUpgrade = 38, 00078 useTech = 39, 00079 useTechPosition = 40, 00080 useTechTarget = 41 00081 }; 00082 bool CommandType_IsValid(int value); 00083 const CommandType CommandType_MIN = none; 00084 const CommandType CommandType_MAX = useTechTarget; 00085 const int CommandType_ARRAYSIZE = CommandType_MAX + 1; 00086 00087 const ::google::protobuf::EnumDescriptor* CommandType_descriptor(); 00088 inline const ::std::string& CommandType_Name(CommandType value) { 00089 return ::google::protobuf::internal::NameOfEnum( 00090 CommandType_descriptor(), value); 00091 } 00092 inline bool CommandType_Parse( 00093 const ::std::string& name, CommandType* value) { 00094 return ::google::protobuf::internal::ParseNamedEnum<CommandType>( 00095 CommandType_descriptor(), name, value); 00096 } 00097 // =================================================================== 00098 00099 class Command : public ::google::protobuf::Message { 00100 public: 00101 Command(); 00102 virtual ~Command(); 00103 00104 Command(const Command& from); 00105 00106 inline Command& operator=(const Command& from) { 00107 CopyFrom(from); 00108 return *this; 00109 } 00110 00111 inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { 00112 return _unknown_fields_; 00113 } 00114 00115 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { 00116 return &_unknown_fields_; 00117 } 00118 00119 static const ::google::protobuf::Descriptor* descriptor(); 00120 static const Command& default_instance(); 00121 00122 void Swap(Command* other); 00123 00124 // implements Message ---------------------------------------------- 00125 00126 Command* New() const; 00127 void CopyFrom(const ::google::protobuf::Message& from); 00128 void MergeFrom(const ::google::protobuf::Message& from); 00129 void CopyFrom(const Command& from); 00130 void MergeFrom(const Command& from); 00131 void Clear(); 00132 bool IsInitialized() const; 00133 00134 int ByteSize() const; 00135 bool MergePartialFromCodedStream( 00136 ::google::protobuf::io::CodedInputStream* input); 00137 void SerializeWithCachedSizes( 00138 ::google::protobuf::io::CodedOutputStream* output) const; 00139 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; 00140 int GetCachedSize() const { return _cached_size_; } 00141 private: 00142 void SharedCtor(); 00143 void SharedDtor(); 00144 void SetCachedSize(int size) const; 00145 public: 00146 00147 ::google::protobuf::Metadata GetMetadata() const; 00148 00149 // nested types ---------------------------------------------------- 00150 00151 // accessors ------------------------------------------------------- 00152 00153 // required .messages.CommandType type = 1; 00154 inline bool has_type() const; 00155 inline void clear_type(); 00156 static const int kTypeFieldNumber = 1; 00157 inline messages::CommandType type() const; 00158 inline void set_type(messages::CommandType value); 00159 00160 // required .messages.UnitId self = 2; 00161 inline bool has_self() const; 00162 inline void clear_self(); 00163 static const int kSelfFieldNumber = 2; 00164 inline const ::messages::UnitId& self() const; 00165 inline ::messages::UnitId* mutable_self(); 00166 00167 // optional .messages.Position pos = 3; 00168 inline bool has_pos() const; 00169 inline void clear_pos(); 00170 static const int kPosFieldNumber = 3; 00171 inline const ::messages::Position& pos() const; 00172 inline ::messages::Position* mutable_pos(); 00173 00174 // optional .messages.TilePosition tilePos = 4; 00175 inline bool has_tilepos() const; 00176 inline void clear_tilepos(); 00177 static const int kTilePosFieldNumber = 4; 00178 inline const ::messages::TilePosition& tilepos() const; 00179 inline ::messages::TilePosition* mutable_tilepos(); 00180 00181 // optional .messages.UnitId target = 5; 00182 inline bool has_target() const; 00183 inline void clear_target(); 00184 static const int kTargetFieldNumber = 5; 00185 inline const ::messages::UnitId& target() const; 00186 inline ::messages::UnitId* mutable_target(); 00187 00188 // optional .messages.UnitType unitType = 6; 00189 inline bool has_unittype() const; 00190 inline void clear_unittype(); 00191 static const int kUnitTypeFieldNumber = 6; 00192 inline const ::messages::UnitType& unittype() const; 00193 inline ::messages::UnitType* mutable_unittype(); 00194 00195 // optional .messages.TechType techType = 7; 00196 inline bool has_techtype() const; 00197 inline void clear_techtype(); 00198 static const int kTechTypeFieldNumber = 7; 00199 inline const ::messages::TechType& techtype() const; 00200 inline ::messages::TechType* mutable_techtype(); 00201 00202 // optional .messages.UpgradeType upgradeType = 8; 00203 inline bool has_upgradetype() const; 00204 inline void clear_upgradetype(); 00205 static const int kUpgradeTypeFieldNumber = 8; 00206 inline const ::messages::UpgradeType& upgradetype() const; 00207 inline ::messages::UpgradeType* mutable_upgradetype(); 00208 00209 // optional int32 slot = 9; 00210 inline bool has_slot() const; 00211 inline void clear_slot(); 00212 static const int kSlotFieldNumber = 9; 00213 inline ::google::protobuf::int32 slot() const; 00214 inline void set_slot(::google::protobuf::int32 value); 00215 00216 // @@protoc_insertion_point(class_scope:messages.Command) 00217 private: 00218 ::google::protobuf::UnknownFieldSet _unknown_fields_; 00219 mutable int _cached_size_; 00220 00221 int type_; 00222 ::messages::UnitId* self_; 00223 ::messages::Position* pos_; 00224 ::messages::TilePosition* tilepos_; 00225 ::messages::UnitId* target_; 00226 ::messages::UnitType* unittype_; 00227 ::messages::TechType* techtype_; 00228 ::messages::UpgradeType* upgradetype_; 00229 ::google::protobuf::int32 slot_; 00230 friend void protobuf_AddDesc_command_2eproto(); 00231 friend void protobuf_AssignDesc_command_2eproto(); 00232 friend void protobuf_ShutdownFile_command_2eproto(); 00233 00234 ::google::protobuf::uint32 _has_bits_[(9 + 31) / 32]; 00235 00236 // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? 00237 inline bool _has_bit(int index) const { 00238 return (_has_bits_[index / 32] & (1u << (index % 32))) != 0; 00239 } 00240 inline void _set_bit(int index) { 00241 _has_bits_[index / 32] |= (1u << (index % 32)); 00242 } 00243 inline void _clear_bit(int index) { 00244 _has_bits_[index / 32] &= ~(1u << (index % 32)); 00245 } 00246 00247 void InitAsDefaultInstance(); 00248 static Command* default_instance_; 00249 }; 00250 // =================================================================== 00251 00252 00253 // =================================================================== 00254 00255 // Command 00256 00257 // required .messages.CommandType type = 1; 00258 inline bool Command::has_type() const { 00259 return _has_bit(0); 00260 } 00261 inline void Command::clear_type() { 00262 type_ = 1; 00263 _clear_bit(0); 00264 } 00265 inline messages::CommandType Command::type() const { 00266 return static_cast< messages::CommandType >(type_); 00267 } 00268 inline void Command::set_type(messages::CommandType value) { 00269 GOOGLE_DCHECK(messages::CommandType_IsValid(value)); 00270 _set_bit(0); 00271 type_ = value; 00272 } 00273 00274 // required .messages.UnitId self = 2; 00275 inline bool Command::has_self() const { 00276 return _has_bit(1); 00277 } 00278 inline void Command::clear_self() { 00279 if (self_ != NULL) self_->::messages::UnitId::Clear(); 00280 _clear_bit(1); 00281 } 00282 inline const ::messages::UnitId& Command::self() const { 00283 return self_ != NULL ? *self_ : *default_instance_->self_; 00284 } 00285 inline ::messages::UnitId* Command::mutable_self() { 00286 _set_bit(1); 00287 if (self_ == NULL) self_ = new ::messages::UnitId; 00288 return self_; 00289 } 00290 00291 // optional .messages.Position pos = 3; 00292 inline bool Command::has_pos() const { 00293 return _has_bit(2); 00294 } 00295 inline void Command::clear_pos() { 00296 if (pos_ != NULL) pos_->::messages::Position::Clear(); 00297 _clear_bit(2); 00298 } 00299 inline const ::messages::Position& Command::pos() const { 00300 return pos_ != NULL ? *pos_ : *default_instance_->pos_; 00301 } 00302 inline ::messages::Position* Command::mutable_pos() { 00303 _set_bit(2); 00304 if (pos_ == NULL) pos_ = new ::messages::Position; 00305 return pos_; 00306 } 00307 00308 // optional .messages.TilePosition tilePos = 4; 00309 inline bool Command::has_tilepos() const { 00310 return _has_bit(3); 00311 } 00312 inline void Command::clear_tilepos() { 00313 if (tilepos_ != NULL) tilepos_->::messages::TilePosition::Clear(); 00314 _clear_bit(3); 00315 } 00316 inline const ::messages::TilePosition& Command::tilepos() const { 00317 return tilepos_ != NULL ? *tilepos_ : *default_instance_->tilepos_; 00318 } 00319 inline ::messages::TilePosition* Command::mutable_tilepos() { 00320 _set_bit(3); 00321 if (tilepos_ == NULL) tilepos_ = new ::messages::TilePosition; 00322 return tilepos_; 00323 } 00324 00325 // optional .messages.UnitId target = 5; 00326 inline bool Command::has_target() const { 00327 return _has_bit(4); 00328 } 00329 inline void Command::clear_target() { 00330 if (target_ != NULL) target_->::messages::UnitId::Clear(); 00331 _clear_bit(4); 00332 } 00333 inline const ::messages::UnitId& Command::target() const { 00334 return target_ != NULL ? *target_ : *default_instance_->target_; 00335 } 00336 inline ::messages::UnitId* Command::mutable_target() { 00337 _set_bit(4); 00338 if (target_ == NULL) target_ = new ::messages::UnitId; 00339 return target_; 00340 } 00341 00342 // optional .messages.UnitType unitType = 6; 00343 inline bool Command::has_unittype() const { 00344 return _has_bit(5); 00345 } 00346 inline void Command::clear_unittype() { 00347 if (unittype_ != NULL) unittype_->::messages::UnitType::Clear(); 00348 _clear_bit(5); 00349 } 00350 inline const ::messages::UnitType& Command::unittype() const { 00351 return unittype_ != NULL ? *unittype_ : *default_instance_->unittype_; 00352 } 00353 inline ::messages::UnitType* Command::mutable_unittype() { 00354 _set_bit(5); 00355 if (unittype_ == NULL) unittype_ = new ::messages::UnitType; 00356 return unittype_; 00357 } 00358 00359 // optional .messages.TechType techType = 7; 00360 inline bool Command::has_techtype() const { 00361 return _has_bit(6); 00362 } 00363 inline void Command::clear_techtype() { 00364 if (techtype_ != NULL) techtype_->::messages::TechType::Clear(); 00365 _clear_bit(6); 00366 } 00367 inline const ::messages::TechType& Command::techtype() const { 00368 return techtype_ != NULL ? *techtype_ : *default_instance_->techtype_; 00369 } 00370 inline ::messages::TechType* Command::mutable_techtype() { 00371 _set_bit(6); 00372 if (techtype_ == NULL) techtype_ = new ::messages::TechType; 00373 return techtype_; 00374 } 00375 00376 // optional .messages.UpgradeType upgradeType = 8; 00377 inline bool Command::has_upgradetype() const { 00378 return _has_bit(7); 00379 } 00380 inline void Command::clear_upgradetype() { 00381 if (upgradetype_ != NULL) upgradetype_->::messages::UpgradeType::Clear(); 00382 _clear_bit(7); 00383 } 00384 inline const ::messages::UpgradeType& Command::upgradetype() const { 00385 return upgradetype_ != NULL ? *upgradetype_ : *default_instance_->upgradetype_; 00386 } 00387 inline ::messages::UpgradeType* Command::mutable_upgradetype() { 00388 _set_bit(7); 00389 if (upgradetype_ == NULL) upgradetype_ = new ::messages::UpgradeType; 00390 return upgradetype_; 00391 } 00392 00393 // optional int32 slot = 9; 00394 inline bool Command::has_slot() const { 00395 return _has_bit(8); 00396 } 00397 inline void Command::clear_slot() { 00398 slot_ = 0; 00399 _clear_bit(8); 00400 } 00401 inline ::google::protobuf::int32 Command::slot() const { 00402 return slot_; 00403 } 00404 inline void Command::set_slot(::google::protobuf::int32 value) { 00405 _set_bit(8); 00406 slot_ = value; 00407 } 00408 00409 00410 // @@protoc_insertion_point(namespace_scope) 00411 00412 } // namespace messages 00413 00414 #ifndef SWIG 00415 namespace google { 00416 namespace protobuf { 00417 00418 template <> 00419 inline const EnumDescriptor* GetEnumDescriptor< messages::CommandType>() { 00420 return messages::CommandType_descriptor(); 00421 } 00422 00423 } // namespace google 00424 } // namespace protobuf 00425 #endif // SWIG 00426 00427 // @@protoc_insertion_point(global_scope) 00428 00429 #endif // PROTOBUF_command_2eproto__INCLUDED