From cd1b32f87128de8cc948d4f6cfa1da67291c970b Mon Sep 17 00:00:00 2001 From: totycro Date: Sat, 9 Apr 2011 16:05:52 +0200 Subject: added .proto file and generated sources --- pacman-c++/pacman.pb.cc | 552 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 552 insertions(+) create mode 100644 pacman-c++/pacman.pb.cc (limited to 'pacman-c++/pacman.pb.cc') diff --git a/pacman-c++/pacman.pb.cc b/pacman-c++/pacman.pb.cc new file mode 100644 index 0000000..8777326 --- /dev/null +++ b/pacman-c++/pacman.pb.cc @@ -0,0 +1,552 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "pacman.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace { + +const ::google::protobuf::Descriptor* KeyPressUpdate_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + KeyPressUpdate_reflection_ = NULL; +const ::google::protobuf::Descriptor* MapUpdate_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + MapUpdate_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_pacman_2eproto() { + protobuf_AddDesc_pacman_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "pacman.proto"); + GOOGLE_CHECK(file != NULL); + KeyPressUpdate_descriptor_ = file->message_type(0); + static const int KeyPressUpdate_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(KeyPressUpdate, newkey_), + }; + KeyPressUpdate_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + KeyPressUpdate_descriptor_, + KeyPressUpdate::default_instance_, + KeyPressUpdate_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(KeyPressUpdate, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(KeyPressUpdate, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(KeyPressUpdate)); + MapUpdate_descriptor_ = file->message_type(1); + static const int MapUpdate_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapUpdate, field_), + }; + MapUpdate_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + MapUpdate_descriptor_, + MapUpdate::default_instance_, + MapUpdate_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapUpdate, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MapUpdate, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(MapUpdate)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_pacman_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + KeyPressUpdate_descriptor_, &KeyPressUpdate::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + MapUpdate_descriptor_, &MapUpdate::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_pacman_2eproto() { + delete KeyPressUpdate::default_instance_; + delete KeyPressUpdate_reflection_; + delete MapUpdate::default_instance_; + delete MapUpdate_reflection_; +} + +void protobuf_AddDesc_pacman_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\014pacman.proto\" \n\016KeyPressUpdate\022\016\n\006newK" + "ey\030\001 \002(\r\"\036\n\tMapUpdate\022\021\n\005field\030\001 \003(\rB\002\020\001", 80); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "pacman.proto", &protobuf_RegisterTypes); + KeyPressUpdate::default_instance_ = new KeyPressUpdate(); + MapUpdate::default_instance_ = new MapUpdate(); + KeyPressUpdate::default_instance_->InitAsDefaultInstance(); + MapUpdate::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_pacman_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_pacman_2eproto { + StaticDescriptorInitializer_pacman_2eproto() { + protobuf_AddDesc_pacman_2eproto(); + } +} static_descriptor_initializer_pacman_2eproto_; + + +// =================================================================== + +#ifndef _MSC_VER +const int KeyPressUpdate::kNewKeyFieldNumber; +#endif // !_MSC_VER + +KeyPressUpdate::KeyPressUpdate() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void KeyPressUpdate::InitAsDefaultInstance() { +} + +KeyPressUpdate::KeyPressUpdate(const KeyPressUpdate& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void KeyPressUpdate::SharedCtor() { + _cached_size_ = 0; + newkey_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +KeyPressUpdate::~KeyPressUpdate() { + SharedDtor(); +} + +void KeyPressUpdate::SharedDtor() { + if (this != default_instance_) { + } +} + +void KeyPressUpdate::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* KeyPressUpdate::descriptor() { + protobuf_AssignDescriptorsOnce(); + return KeyPressUpdate_descriptor_; +} + +const KeyPressUpdate& KeyPressUpdate::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pacman_2eproto(); return *default_instance_; +} + +KeyPressUpdate* KeyPressUpdate::default_instance_ = NULL; + +KeyPressUpdate* KeyPressUpdate::New() const { + return new KeyPressUpdate; +} + +void KeyPressUpdate::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + newkey_ = 0u; + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool KeyPressUpdate::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // required uint32 newKey = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, &newkey_))); + set_has_newkey(); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void KeyPressUpdate::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // required uint32 newKey = 1; + if (has_newkey()) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->newkey(), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* KeyPressUpdate::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // required uint32 newKey = 1; + if (has_newkey()) { + target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->newkey(), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int KeyPressUpdate::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // required uint32 newKey = 1; + if (has_newkey()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::UInt32Size( + this->newkey()); + } + + } + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void KeyPressUpdate::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const KeyPressUpdate* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void KeyPressUpdate::MergeFrom(const KeyPressUpdate& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_newkey()) { + set_newkey(from.newkey()); + } + } + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void KeyPressUpdate::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void KeyPressUpdate::CopyFrom(const KeyPressUpdate& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool KeyPressUpdate::IsInitialized() const { + if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; + + return true; +} + +void KeyPressUpdate::Swap(KeyPressUpdate* other) { + if (other != this) { + std::swap(newkey_, other->newkey_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata KeyPressUpdate::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = KeyPressUpdate_descriptor_; + metadata.reflection = KeyPressUpdate_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int MapUpdate::kFieldFieldNumber; +#endif // !_MSC_VER + +MapUpdate::MapUpdate() + : ::google::protobuf::Message() { + SharedCtor(); +} + +void MapUpdate::InitAsDefaultInstance() { +} + +MapUpdate::MapUpdate(const MapUpdate& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); +} + +void MapUpdate::SharedCtor() { + _cached_size_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +MapUpdate::~MapUpdate() { + SharedDtor(); +} + +void MapUpdate::SharedDtor() { + if (this != default_instance_) { + } +} + +void MapUpdate::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* MapUpdate::descriptor() { + protobuf_AssignDescriptorsOnce(); + return MapUpdate_descriptor_; +} + +const MapUpdate& MapUpdate::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_pacman_2eproto(); return *default_instance_; +} + +MapUpdate* MapUpdate::default_instance_ = NULL; + +MapUpdate* MapUpdate::New() const { + return new MapUpdate; +} + +void MapUpdate::Clear() { + field_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); + mutable_unknown_fields()->Clear(); +} + +bool MapUpdate::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated uint32 field = 1 [packed = true]; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_field()))); + } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) + == ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_VARINT) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( + 1, 10, input, this->mutable_field()))); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, mutable_unknown_fields())); + break; + } + } + } + return true; +#undef DO_ +} + +void MapUpdate::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // repeated uint32 field = 1 [packed = true]; + if (this->field_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_field_cached_byte_size_); + } + for (int i = 0; i < this->field_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteUInt32NoTag( + this->field(i), output); + } + + if (!unknown_fields().empty()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + unknown_fields(), output); + } +} + +::google::protobuf::uint8* MapUpdate::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // repeated uint32 field = 1 [packed = true]; + if (this->field_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 1, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _field_cached_byte_size_, target); + } + for (int i = 0; i < this->field_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt32NoTagToArray(this->field(i), target); + } + + if (!unknown_fields().empty()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + unknown_fields(), target); + } + return target; +} + +int MapUpdate::ByteSize() const { + int total_size = 0; + + // repeated uint32 field = 1 [packed = true]; + { + int data_size = 0; + for (int i = 0; i < this->field_size(); i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + UInt32Size(this->field(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + _field_cached_byte_size_ = data_size; + total_size += data_size; + } + + if (!unknown_fields().empty()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + unknown_fields()); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void MapUpdate::MergeFrom(const ::google::protobuf::Message& from) { + GOOGLE_CHECK_NE(&from, this); + const MapUpdate* source = + ::google::protobuf::internal::dynamic_cast_if_available( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void MapUpdate::MergeFrom(const MapUpdate& from) { + GOOGLE_CHECK_NE(&from, this); + field_.MergeFrom(from.field_); + mutable_unknown_fields()->MergeFrom(from.unknown_fields()); +} + +void MapUpdate::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void MapUpdate::CopyFrom(const MapUpdate& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MapUpdate::IsInitialized() const { + + return true; +} + +void MapUpdate::Swap(MapUpdate* other) { + if (other != this) { + field_.Swap(&other->field_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + _unknown_fields_.Swap(&other->_unknown_fields_); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::google::protobuf::Metadata MapUpdate::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = MapUpdate_descriptor_; + metadata.reflection = MapUpdate_reflection_; + return metadata; +} + + +// @@protoc_insertion_point(namespace_scope) + +// @@protoc_insertion_point(global_scope) -- cgit v1.2.3