123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567 |
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: roads.proto
- #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
- #include "roads.pb.h"
- #include <algorithm>
- #include <google/protobuf/stubs/common.h>
- #include <google/protobuf/stubs/port.h>
- #include <google/protobuf/stubs/once.h>
- #include <google/protobuf/io/coded_stream.h>
- #include <google/protobuf/wire_format_lite_inl.h>
- #include <google/protobuf/descriptor.h>
- #include <google/protobuf/generated_message_reflection.h>
- #include <google/protobuf/reflection_ops.h>
- #include <google/protobuf/wire_format.h>
- // @@protoc_insertion_point(includes)
- namespace iv {
- namespace map {
- namespace {
- const ::google::protobuf::Descriptor* road_descriptor_ = NULL;
- const ::google::protobuf::internal::GeneratedMessageReflection*
- road_reflection_ = NULL;
- } // namespace
- void protobuf_AssignDesc_roads_2eproto() GOOGLE_ATTRIBUTE_COLD;
- void protobuf_AssignDesc_roads_2eproto() {
- protobuf_AddDesc_roads_2eproto();
- const ::google::protobuf::FileDescriptor* file =
- ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
- "roads.proto");
- GOOGLE_CHECK(file != NULL);
- road_descriptor_ = file->message_type(0);
- static const int road_offsets_[3] = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(road, geonum_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(road, roadname_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(road, lenth_),
- };
- road_reflection_ =
- ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
- road_descriptor_,
- road::default_instance_,
- road_offsets_,
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(road, _has_bits_[0]),
- -1,
- -1,
- sizeof(road),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(road, _internal_metadata_),
- -1);
- }
- namespace {
- GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
- inline void protobuf_AssignDescriptorsOnce() {
- ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
- &protobuf_AssignDesc_roads_2eproto);
- }
- void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
- void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
- road_descriptor_, &road::default_instance());
- }
- } // namespace
- void protobuf_ShutdownFile_roads_2eproto() {
- delete road::default_instance_;
- delete road_reflection_;
- }
- void protobuf_AddDesc_roads_2eproto() GOOGLE_ATTRIBUTE_COLD;
- void protobuf_AddDesc_roads_2eproto() {
- static bool already_here = false;
- if (already_here) return;
- already_here = true;
- GOOGLE_PROTOBUF_VERIFY_VERSION;
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- "\n\013roads.proto\022\006iv.map\"7\n\004road\022\016\n\006geonum\030"
- "\001 \003(\005\022\020\n\010roadname\030\002 \001(\t\022\r\n\005lenth\030\003 \002(\001", 78);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "roads.proto", &protobuf_RegisterTypes);
- road::default_instance_ = new road();
- road::default_instance_->InitAsDefaultInstance();
- ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_roads_2eproto);
- }
- // Force AddDescriptors() to be called at static initialization time.
- struct StaticDescriptorInitializer_roads_2eproto {
- StaticDescriptorInitializer_roads_2eproto() {
- protobuf_AddDesc_roads_2eproto();
- }
- } static_descriptor_initializer_roads_2eproto_;
- // ===================================================================
- #if !defined(_MSC_VER) || _MSC_VER >= 1900
- const int road::kGeonumFieldNumber;
- const int road::kRoadnameFieldNumber;
- const int road::kLenthFieldNumber;
- #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
- road::road()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- SharedCtor();
- // @@protoc_insertion_point(constructor:iv.map.road)
- }
- void road::InitAsDefaultInstance() {
- }
- road::road(const road& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL) {
- SharedCtor();
- MergeFrom(from);
- // @@protoc_insertion_point(copy_constructor:iv.map.road)
- }
- void road::SharedCtor() {
- ::google::protobuf::internal::GetEmptyString();
- _cached_size_ = 0;
- roadname_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- lenth_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- }
- road::~road() {
- // @@protoc_insertion_point(destructor:iv.map.road)
- SharedDtor();
- }
- void road::SharedDtor() {
- roadname_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (this != default_instance_) {
- }
- }
- void road::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- }
- const ::google::protobuf::Descriptor* road::descriptor() {
- protobuf_AssignDescriptorsOnce();
- return road_descriptor_;
- }
- const road& road::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_roads_2eproto();
- return *default_instance_;
- }
- road* road::default_instance_ = NULL;
- road* road::New(::google::protobuf::Arena* arena) const {
- road* n = new road;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
- }
- void road::Clear() {
- // @@protoc_insertion_point(message_clear_start:iv.map.road)
- if (_has_bits_[0 / 32] & 6u) {
- if (has_roadname()) {
- roadname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- lenth_ = 0;
- }
- geonum_.Clear();
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
- if (_internal_metadata_.have_unknown_fields()) {
- mutable_unknown_fields()->Clear();
- }
- }
- bool road::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
- #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
- ::google::protobuf::uint32 tag;
- // @@protoc_insertion_point(parse_start:iv.map.road)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // repeated int32 geonum = 1;
- case 1: {
- if (tag == 8) {
- parse_geonum:
- DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- 1, 8, input, this->mutable_geonum())));
- } else if (tag == 10) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, this->mutable_geonum())));
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(8)) goto parse_geonum;
- if (input->ExpectTag(18)) goto parse_roadname;
- break;
- }
- // optional string roadname = 2;
- case 2: {
- if (tag == 18) {
- parse_roadname:
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_roadname()));
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->roadname().data(), this->roadname().length(),
- ::google::protobuf::internal::WireFormat::PARSE,
- "iv.map.road.roadname");
- } else {
- goto handle_unusual;
- }
- if (input->ExpectTag(25)) goto parse_lenth;
- break;
- }
- // required double lenth = 3;
- case 3: {
- if (tag == 25) {
- parse_lenth:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &lenth_)));
- set_has_lenth();
- } else {
- goto handle_unusual;
- }
- if (input->ExpectAtEnd()) goto success;
- break;
- }
- default: {
- handle_unusual:
- if (tag == 0 ||
- ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, mutable_unknown_fields()));
- break;
- }
- }
- }
- success:
- // @@protoc_insertion_point(parse_success:iv.map.road)
- return true;
- failure:
- // @@protoc_insertion_point(parse_failure:iv.map.road)
- return false;
- #undef DO_
- }
- void road::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:iv.map.road)
- // repeated int32 geonum = 1;
- for (int i = 0; i < this->geonum_size(); i++) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(
- 1, this->geonum(i), output);
- }
- // optional string roadname = 2;
- if (has_roadname()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->roadname().data(), this->roadname().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "iv.map.road.roadname");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 2, this->roadname(), output);
- }
- // required double lenth = 3;
- if (has_lenth()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->lenth(), output);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- unknown_fields(), output);
- }
- // @@protoc_insertion_point(serialize_end:iv.map.road)
- }
- ::google::protobuf::uint8* road::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- // @@protoc_insertion_point(serialize_to_array_start:iv.map.road)
- // repeated int32 geonum = 1;
- for (int i = 0; i < this->geonum_size(); i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- WriteInt32ToArray(1, this->geonum(i), target);
- }
- // optional string roadname = 2;
- if (has_roadname()) {
- ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
- this->roadname().data(), this->roadname().length(),
- ::google::protobuf::internal::WireFormat::SERIALIZE,
- "iv.map.road.roadname");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 2, this->roadname(), target);
- }
- // required double lenth = 3;
- if (has_lenth()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->lenth(), target);
- }
- if (_internal_metadata_.have_unknown_fields()) {
- target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
- unknown_fields(), target);
- }
- // @@protoc_insertion_point(serialize_to_array_end:iv.map.road)
- return target;
- }
- int road::ByteSize() const {
- // @@protoc_insertion_point(message_byte_size_start:iv.map.road)
- int total_size = 0;
- // required double lenth = 3;
- if (has_lenth()) {
- total_size += 1 + 8;
- }
- // optional string roadname = 2;
- if (has_roadname()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->roadname());
- }
- // repeated int32 geonum = 1;
- {
- int data_size = 0;
- for (int i = 0; i < this->geonum_size(); i++) {
- data_size += ::google::protobuf::internal::WireFormatLite::
- Int32Size(this->geonum(i));
- }
- total_size += 1 * this->geonum_size() + data_size;
- }
- if (_internal_metadata_.have_unknown_fields()) {
- 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 road::MergeFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_merge_from_start:iv.map.road)
- if (GOOGLE_PREDICT_FALSE(&from == this)) {
- ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
- }
- const road* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const road>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:iv.map.road)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:iv.map.road)
- MergeFrom(*source);
- }
- }
- void road::MergeFrom(const road& from) {
- // @@protoc_insertion_point(class_specific_merge_from_start:iv.map.road)
- if (GOOGLE_PREDICT_FALSE(&from == this)) {
- ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
- }
- geonum_.MergeFrom(from.geonum_);
- if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
- if (from.has_roadname()) {
- set_has_roadname();
- roadname_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.roadname_);
- }
- if (from.has_lenth()) {
- set_lenth(from.lenth());
- }
- }
- if (from._internal_metadata_.have_unknown_fields()) {
- mutable_unknown_fields()->MergeFrom(from.unknown_fields());
- }
- }
- void road::CopyFrom(const ::google::protobuf::Message& from) {
- // @@protoc_insertion_point(generalized_copy_from_start:iv.map.road)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- void road::CopyFrom(const road& from) {
- // @@protoc_insertion_point(class_specific_copy_from_start:iv.map.road)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
- }
- bool road::IsInitialized() const {
- if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false;
- return true;
- }
- void road::Swap(road* other) {
- if (other == this) return;
- InternalSwap(other);
- }
- void road::InternalSwap(road* other) {
- geonum_.UnsafeArenaSwap(&other->geonum_);
- roadname_.Swap(&other->roadname_);
- std::swap(lenth_, other->lenth_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- std::swap(_cached_size_, other->_cached_size_);
- }
- ::google::protobuf::Metadata road::GetMetadata() const {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::Metadata metadata;
- metadata.descriptor = road_descriptor_;
- metadata.reflection = road_reflection_;
- return metadata;
- }
- #if PROTOBUF_INLINE_NOT_IN_HEADERS
- // road
- // repeated int32 geonum = 1;
- int road::geonum_size() const {
- return geonum_.size();
- }
- void road::clear_geonum() {
- geonum_.Clear();
- }
- ::google::protobuf::int32 road::geonum(int index) const {
- // @@protoc_insertion_point(field_get:iv.map.road.geonum)
- return geonum_.Get(index);
- }
- void road::set_geonum(int index, ::google::protobuf::int32 value) {
- geonum_.Set(index, value);
- // @@protoc_insertion_point(field_set:iv.map.road.geonum)
- }
- void road::add_geonum(::google::protobuf::int32 value) {
- geonum_.Add(value);
- // @@protoc_insertion_point(field_add:iv.map.road.geonum)
- }
- const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
- road::geonum() const {
- // @@protoc_insertion_point(field_list:iv.map.road.geonum)
- return geonum_;
- }
- ::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
- road::mutable_geonum() {
- // @@protoc_insertion_point(field_mutable_list:iv.map.road.geonum)
- return &geonum_;
- }
- // optional string roadname = 2;
- bool road::has_roadname() const {
- return (_has_bits_[0] & 0x00000002u) != 0;
- }
- void road::set_has_roadname() {
- _has_bits_[0] |= 0x00000002u;
- }
- void road::clear_has_roadname() {
- _has_bits_[0] &= ~0x00000002u;
- }
- void road::clear_roadname() {
- roadname_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- clear_has_roadname();
- }
- const ::std::string& road::roadname() const {
- // @@protoc_insertion_point(field_get:iv.map.road.roadname)
- return roadname_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void road::set_roadname(const ::std::string& value) {
- set_has_roadname();
- roadname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:iv.map.road.roadname)
- }
- void road::set_roadname(const char* value) {
- set_has_roadname();
- roadname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:iv.map.road.roadname)
- }
- void road::set_roadname(const char* value, size_t size) {
- set_has_roadname();
- roadname_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:iv.map.road.roadname)
- }
- ::std::string* road::mutable_roadname() {
- set_has_roadname();
- // @@protoc_insertion_point(field_mutable:iv.map.road.roadname)
- return roadname_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- ::std::string* road::release_roadname() {
- // @@protoc_insertion_point(field_release:iv.map.road.roadname)
- clear_has_roadname();
- return roadname_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- void road::set_allocated_roadname(::std::string* roadname) {
- if (roadname != NULL) {
- set_has_roadname();
- } else {
- clear_has_roadname();
- }
- roadname_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), roadname);
- // @@protoc_insertion_point(field_set_allocated:iv.map.road.roadname)
- }
- // required double lenth = 3;
- bool road::has_lenth() const {
- return (_has_bits_[0] & 0x00000004u) != 0;
- }
- void road::set_has_lenth() {
- _has_bits_[0] |= 0x00000004u;
- }
- void road::clear_has_lenth() {
- _has_bits_[0] &= ~0x00000004u;
- }
- void road::clear_lenth() {
- lenth_ = 0;
- clear_has_lenth();
- }
- double road::lenth() const {
- // @@protoc_insertion_point(field_get:iv.map.road.lenth)
- return lenth_;
- }
- void road::set_lenth(double value) {
- set_has_lenth();
- lenth_ = value;
- // @@protoc_insertion_point(field_set:iv.map.road.lenth)
- }
- #endif // PROTOBUF_INLINE_NOT_IN_HEADERS
- // @@protoc_insertion_point(namespace_scope)
- } // namespace map
- } // namespace iv
- // @@protoc_insertion_point(global_scope)
|