github.com/igggame/nebulas-go@v2.1.0+incompatible/nbre/fs/proto/genesis.pb.cc (about) 1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: genesis.proto 3 4 #include "genesis.pb.h" 5 6 #include <algorithm> 7 8 #include <google/protobuf/stubs/common.h> 9 #include <google/protobuf/stubs/port.h> 10 #include <google/protobuf/io/coded_stream.h> 11 #include <google/protobuf/wire_format_lite_inl.h> 12 #include <google/protobuf/descriptor.h> 13 #include <google/protobuf/generated_message_reflection.h> 14 #include <google/protobuf/reflection_ops.h> 15 #include <google/protobuf/wire_format.h> 16 // This is a temporary google only hack 17 #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS 18 #include "third_party/protobuf/version.h" 19 #endif 20 // @@protoc_insertion_point(includes) 21 22 namespace protobuf_genesis_2eproto { 23 extern PROTOBUF_INTERNAL_EXPORT_protobuf_genesis_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_GenesisConsensusDpos; 24 extern PROTOBUF_INTERNAL_EXPORT_protobuf_genesis_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_GenesisMeta; 25 extern PROTOBUF_INTERNAL_EXPORT_protobuf_genesis_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_GenesisTokenDistribution; 26 extern PROTOBUF_INTERNAL_EXPORT_protobuf_genesis_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_GenesisConsensus; 27 } // namespace protobuf_genesis_2eproto 28 namespace corepb { 29 class GenesisDefaultTypeInternal { 30 public: 31 ::google::protobuf::internal::ExplicitlyConstructed<Genesis> 32 _instance; 33 } _Genesis_default_instance_; 34 class GenesisMetaDefaultTypeInternal { 35 public: 36 ::google::protobuf::internal::ExplicitlyConstructed<GenesisMeta> 37 _instance; 38 } _GenesisMeta_default_instance_; 39 class GenesisConsensusDefaultTypeInternal { 40 public: 41 ::google::protobuf::internal::ExplicitlyConstructed<GenesisConsensus> 42 _instance; 43 } _GenesisConsensus_default_instance_; 44 class GenesisConsensusDposDefaultTypeInternal { 45 public: 46 ::google::protobuf::internal::ExplicitlyConstructed<GenesisConsensusDpos> 47 _instance; 48 } _GenesisConsensusDpos_default_instance_; 49 class GenesisTokenDistributionDefaultTypeInternal { 50 public: 51 ::google::protobuf::internal::ExplicitlyConstructed<GenesisTokenDistribution> 52 _instance; 53 } _GenesisTokenDistribution_default_instance_; 54 } // namespace corepb 55 namespace protobuf_genesis_2eproto { 56 static void InitDefaultsGenesis() { 57 GOOGLE_PROTOBUF_VERIFY_VERSION; 58 59 { 60 void* ptr = &::corepb::_Genesis_default_instance_; 61 new (ptr) ::corepb::Genesis(); 62 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 63 } 64 ::corepb::Genesis::InitAsDefaultInstance(); 65 } 66 67 ::google::protobuf::internal::SCCInfo<3> scc_info_Genesis = 68 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsGenesis}, { 69 &protobuf_genesis_2eproto::scc_info_GenesisMeta.base, 70 &protobuf_genesis_2eproto::scc_info_GenesisConsensus.base, 71 &protobuf_genesis_2eproto::scc_info_GenesisTokenDistribution.base,}}; 72 73 static void InitDefaultsGenesisMeta() { 74 GOOGLE_PROTOBUF_VERIFY_VERSION; 75 76 { 77 void* ptr = &::corepb::_GenesisMeta_default_instance_; 78 new (ptr) ::corepb::GenesisMeta(); 79 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 80 } 81 ::corepb::GenesisMeta::InitAsDefaultInstance(); 82 } 83 84 ::google::protobuf::internal::SCCInfo<0> scc_info_GenesisMeta = 85 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGenesisMeta}, {}}; 86 87 static void InitDefaultsGenesisConsensus() { 88 GOOGLE_PROTOBUF_VERIFY_VERSION; 89 90 { 91 void* ptr = &::corepb::_GenesisConsensus_default_instance_; 92 new (ptr) ::corepb::GenesisConsensus(); 93 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 94 } 95 ::corepb::GenesisConsensus::InitAsDefaultInstance(); 96 } 97 98 ::google::protobuf::internal::SCCInfo<1> scc_info_GenesisConsensus = 99 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsGenesisConsensus}, { 100 &protobuf_genesis_2eproto::scc_info_GenesisConsensusDpos.base,}}; 101 102 static void InitDefaultsGenesisConsensusDpos() { 103 GOOGLE_PROTOBUF_VERIFY_VERSION; 104 105 { 106 void* ptr = &::corepb::_GenesisConsensusDpos_default_instance_; 107 new (ptr) ::corepb::GenesisConsensusDpos(); 108 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 109 } 110 ::corepb::GenesisConsensusDpos::InitAsDefaultInstance(); 111 } 112 113 ::google::protobuf::internal::SCCInfo<0> scc_info_GenesisConsensusDpos = 114 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGenesisConsensusDpos}, {}}; 115 116 static void InitDefaultsGenesisTokenDistribution() { 117 GOOGLE_PROTOBUF_VERIFY_VERSION; 118 119 { 120 void* ptr = &::corepb::_GenesisTokenDistribution_default_instance_; 121 new (ptr) ::corepb::GenesisTokenDistribution(); 122 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 123 } 124 ::corepb::GenesisTokenDistribution::InitAsDefaultInstance(); 125 } 126 127 ::google::protobuf::internal::SCCInfo<0> scc_info_GenesisTokenDistribution = 128 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsGenesisTokenDistribution}, {}}; 129 130 void InitDefaults() { 131 ::google::protobuf::internal::InitSCC(&scc_info_Genesis.base); 132 ::google::protobuf::internal::InitSCC(&scc_info_GenesisMeta.base); 133 ::google::protobuf::internal::InitSCC(&scc_info_GenesisConsensus.base); 134 ::google::protobuf::internal::InitSCC(&scc_info_GenesisConsensusDpos.base); 135 ::google::protobuf::internal::InitSCC(&scc_info_GenesisTokenDistribution.base); 136 } 137 138 ::google::protobuf::Metadata file_level_metadata[5]; 139 140 const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { 141 ~0u, // no _has_bits_ 142 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::Genesis, _internal_metadata_), 143 ~0u, // no _extensions_ 144 ~0u, // no _oneof_case_ 145 ~0u, // no _weak_field_map_ 146 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::Genesis, meta_), 147 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::Genesis, consensus_), 148 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::Genesis, token_distribution_), 149 ~0u, // no _has_bits_ 150 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::GenesisMeta, _internal_metadata_), 151 ~0u, // no _extensions_ 152 ~0u, // no _oneof_case_ 153 ~0u, // no _weak_field_map_ 154 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::GenesisMeta, chain_id_), 155 ~0u, // no _has_bits_ 156 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::GenesisConsensus, _internal_metadata_), 157 ~0u, // no _extensions_ 158 ~0u, // no _oneof_case_ 159 ~0u, // no _weak_field_map_ 160 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::GenesisConsensus, dpos_), 161 ~0u, // no _has_bits_ 162 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::GenesisConsensusDpos, _internal_metadata_), 163 ~0u, // no _extensions_ 164 ~0u, // no _oneof_case_ 165 ~0u, // no _weak_field_map_ 166 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::GenesisConsensusDpos, dynasty_), 167 ~0u, // no _has_bits_ 168 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::GenesisTokenDistribution, _internal_metadata_), 169 ~0u, // no _extensions_ 170 ~0u, // no _oneof_case_ 171 ~0u, // no _weak_field_map_ 172 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::GenesisTokenDistribution, address_), 173 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::corepb::GenesisTokenDistribution, value_), 174 }; 175 static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { 176 { 0, -1, sizeof(::corepb::Genesis)}, 177 { 8, -1, sizeof(::corepb::GenesisMeta)}, 178 { 14, -1, sizeof(::corepb::GenesisConsensus)}, 179 { 20, -1, sizeof(::corepb::GenesisConsensusDpos)}, 180 { 26, -1, sizeof(::corepb::GenesisTokenDistribution)}, 181 }; 182 183 static ::google::protobuf::Message const * const file_default_instances[] = { 184 reinterpret_cast<const ::google::protobuf::Message*>(&::corepb::_Genesis_default_instance_), 185 reinterpret_cast<const ::google::protobuf::Message*>(&::corepb::_GenesisMeta_default_instance_), 186 reinterpret_cast<const ::google::protobuf::Message*>(&::corepb::_GenesisConsensus_default_instance_), 187 reinterpret_cast<const ::google::protobuf::Message*>(&::corepb::_GenesisConsensusDpos_default_instance_), 188 reinterpret_cast<const ::google::protobuf::Message*>(&::corepb::_GenesisTokenDistribution_default_instance_), 189 }; 190 191 void protobuf_AssignDescriptors() { 192 AddDescriptors(); 193 AssignDescriptors( 194 "genesis.proto", schemas, file_default_instances, TableStruct::offsets, 195 file_level_metadata, NULL, NULL); 196 } 197 198 void protobuf_AssignDescriptorsOnce() { 199 static ::google::protobuf::internal::once_flag once; 200 ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors); 201 } 202 203 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; 204 void protobuf_RegisterTypes(const ::std::string&) { 205 protobuf_AssignDescriptorsOnce(); 206 ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5); 207 } 208 209 void AddDescriptorsImpl() { 210 InitDefaults(); 211 static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { 212 "\n\rgenesis.proto\022\006corepb\"\227\001\n\007Genesis\022!\n\004m" 213 "eta\030\001 \001(\0132\023.corepb.GenesisMeta\022+\n\tconsen" 214 "sus\030\002 \001(\0132\030.corepb.GenesisConsensus\022<\n\022t" 215 "oken_distribution\030\003 \003(\0132 .corepb.Genesis" 216 "TokenDistribution\"\037\n\013GenesisMeta\022\020\n\010chai" 217 "n_id\030\001 \001(\r\">\n\020GenesisConsensus\022*\n\004dpos\030\001" 218 " \001(\0132\034.corepb.GenesisConsensusDpos\"\'\n\024Ge" 219 "nesisConsensusDpos\022\017\n\007dynasty\030\001 \003(\t\":\n\030G" 220 "enesisTokenDistribution\022\017\n\007address\030\001 \001(\t" 221 "\022\r\n\005value\030\002 \001(\tb\006proto3" 222 }; 223 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( 224 descriptor, 383); 225 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( 226 "genesis.proto", &protobuf_RegisterTypes); 227 } 228 229 void AddDescriptors() { 230 static ::google::protobuf::internal::once_flag once; 231 ::google::protobuf::internal::call_once(once, AddDescriptorsImpl); 232 } 233 // Force AddDescriptors() to be called at dynamic initialization time. 234 struct StaticDescriptorInitializer { 235 StaticDescriptorInitializer() { 236 AddDescriptors(); 237 } 238 } static_descriptor_initializer; 239 } // namespace protobuf_genesis_2eproto 240 namespace corepb { 241 242 // =================================================================== 243 244 void Genesis::InitAsDefaultInstance() { 245 ::corepb::_Genesis_default_instance_._instance.get_mutable()->meta_ = const_cast< ::corepb::GenesisMeta*>( 246 ::corepb::GenesisMeta::internal_default_instance()); 247 ::corepb::_Genesis_default_instance_._instance.get_mutable()->consensus_ = const_cast< ::corepb::GenesisConsensus*>( 248 ::corepb::GenesisConsensus::internal_default_instance()); 249 } 250 #if !defined(_MSC_VER) || _MSC_VER >= 1900 251 const int Genesis::kMetaFieldNumber; 252 const int Genesis::kConsensusFieldNumber; 253 const int Genesis::kTokenDistributionFieldNumber; 254 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 255 256 Genesis::Genesis() 257 : ::google::protobuf::Message(), _internal_metadata_(NULL) { 258 ::google::protobuf::internal::InitSCC( 259 &protobuf_genesis_2eproto::scc_info_Genesis.base); 260 SharedCtor(); 261 // @@protoc_insertion_point(constructor:corepb.Genesis) 262 } 263 Genesis::Genesis(const Genesis& from) 264 : ::google::protobuf::Message(), 265 _internal_metadata_(NULL), 266 token_distribution_(from.token_distribution_) { 267 _internal_metadata_.MergeFrom(from._internal_metadata_); 268 if (from.has_meta()) { 269 meta_ = new ::corepb::GenesisMeta(*from.meta_); 270 } else { 271 meta_ = NULL; 272 } 273 if (from.has_consensus()) { 274 consensus_ = new ::corepb::GenesisConsensus(*from.consensus_); 275 } else { 276 consensus_ = NULL; 277 } 278 // @@protoc_insertion_point(copy_constructor:corepb.Genesis) 279 } 280 281 void Genesis::SharedCtor() { 282 ::memset(&meta_, 0, static_cast<size_t>( 283 reinterpret_cast<char*>(&consensus_) - 284 reinterpret_cast<char*>(&meta_)) + sizeof(consensus_)); 285 } 286 287 Genesis::~Genesis() { 288 // @@protoc_insertion_point(destructor:corepb.Genesis) 289 SharedDtor(); 290 } 291 292 void Genesis::SharedDtor() { 293 if (this != internal_default_instance()) delete meta_; 294 if (this != internal_default_instance()) delete consensus_; 295 } 296 297 void Genesis::SetCachedSize(int size) const { 298 _cached_size_.Set(size); 299 } 300 const ::google::protobuf::Descriptor* Genesis::descriptor() { 301 ::protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 302 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; 303 } 304 305 const Genesis& Genesis::default_instance() { 306 ::google::protobuf::internal::InitSCC(&protobuf_genesis_2eproto::scc_info_Genesis.base); 307 return *internal_default_instance(); 308 } 309 310 311 void Genesis::Clear() { 312 // @@protoc_insertion_point(message_clear_start:corepb.Genesis) 313 ::google::protobuf::uint32 cached_has_bits = 0; 314 // Prevent compiler warnings about cached_has_bits being unused 315 (void) cached_has_bits; 316 317 token_distribution_.Clear(); 318 if (GetArenaNoVirtual() == NULL && meta_ != NULL) { 319 delete meta_; 320 } 321 meta_ = NULL; 322 if (GetArenaNoVirtual() == NULL && consensus_ != NULL) { 323 delete consensus_; 324 } 325 consensus_ = NULL; 326 _internal_metadata_.Clear(); 327 } 328 329 bool Genesis::MergePartialFromCodedStream( 330 ::google::protobuf::io::CodedInputStream* input) { 331 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 332 ::google::protobuf::uint32 tag; 333 // @@protoc_insertion_point(parse_start:corepb.Genesis) 334 for (;;) { 335 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 336 tag = p.first; 337 if (!p.second) goto handle_unusual; 338 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 339 // .corepb.GenesisMeta meta = 1; 340 case 1: { 341 if (static_cast< ::google::protobuf::uint8>(tag) == 342 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 343 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 344 input, mutable_meta())); 345 } else { 346 goto handle_unusual; 347 } 348 break; 349 } 350 351 // .corepb.GenesisConsensus consensus = 2; 352 case 2: { 353 if (static_cast< ::google::protobuf::uint8>(tag) == 354 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 355 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 356 input, mutable_consensus())); 357 } else { 358 goto handle_unusual; 359 } 360 break; 361 } 362 363 // repeated .corepb.GenesisTokenDistribution token_distribution = 3; 364 case 3: { 365 if (static_cast< ::google::protobuf::uint8>(tag) == 366 static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { 367 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 368 input, add_token_distribution())); 369 } else { 370 goto handle_unusual; 371 } 372 break; 373 } 374 375 default: { 376 handle_unusual: 377 if (tag == 0) { 378 goto success; 379 } 380 DO_(::google::protobuf::internal::WireFormat::SkipField( 381 input, tag, _internal_metadata_.mutable_unknown_fields())); 382 break; 383 } 384 } 385 } 386 success: 387 // @@protoc_insertion_point(parse_success:corepb.Genesis) 388 return true; 389 failure: 390 // @@protoc_insertion_point(parse_failure:corepb.Genesis) 391 return false; 392 #undef DO_ 393 } 394 395 void Genesis::SerializeWithCachedSizes( 396 ::google::protobuf::io::CodedOutputStream* output) const { 397 // @@protoc_insertion_point(serialize_start:corepb.Genesis) 398 ::google::protobuf::uint32 cached_has_bits = 0; 399 (void) cached_has_bits; 400 401 // .corepb.GenesisMeta meta = 1; 402 if (this->has_meta()) { 403 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 404 1, this->_internal_meta(), output); 405 } 406 407 // .corepb.GenesisConsensus consensus = 2; 408 if (this->has_consensus()) { 409 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 410 2, this->_internal_consensus(), output); 411 } 412 413 // repeated .corepb.GenesisTokenDistribution token_distribution = 3; 414 for (unsigned int i = 0, 415 n = static_cast<unsigned int>(this->token_distribution_size()); i < n; i++) { 416 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 417 3, 418 this->token_distribution(static_cast<int>(i)), 419 output); 420 } 421 422 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 423 ::google::protobuf::internal::WireFormat::SerializeUnknownFields( 424 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); 425 } 426 // @@protoc_insertion_point(serialize_end:corepb.Genesis) 427 } 428 429 ::google::protobuf::uint8* Genesis::InternalSerializeWithCachedSizesToArray( 430 bool deterministic, ::google::protobuf::uint8* target) const { 431 (void)deterministic; // Unused 432 // @@protoc_insertion_point(serialize_to_array_start:corepb.Genesis) 433 ::google::protobuf::uint32 cached_has_bits = 0; 434 (void) cached_has_bits; 435 436 // .corepb.GenesisMeta meta = 1; 437 if (this->has_meta()) { 438 target = ::google::protobuf::internal::WireFormatLite:: 439 InternalWriteMessageToArray( 440 1, this->_internal_meta(), deterministic, target); 441 } 442 443 // .corepb.GenesisConsensus consensus = 2; 444 if (this->has_consensus()) { 445 target = ::google::protobuf::internal::WireFormatLite:: 446 InternalWriteMessageToArray( 447 2, this->_internal_consensus(), deterministic, target); 448 } 449 450 // repeated .corepb.GenesisTokenDistribution token_distribution = 3; 451 for (unsigned int i = 0, 452 n = static_cast<unsigned int>(this->token_distribution_size()); i < n; i++) { 453 target = ::google::protobuf::internal::WireFormatLite:: 454 InternalWriteMessageToArray( 455 3, this->token_distribution(static_cast<int>(i)), deterministic, target); 456 } 457 458 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 459 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( 460 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); 461 } 462 // @@protoc_insertion_point(serialize_to_array_end:corepb.Genesis) 463 return target; 464 } 465 466 size_t Genesis::ByteSizeLong() const { 467 // @@protoc_insertion_point(message_byte_size_start:corepb.Genesis) 468 size_t total_size = 0; 469 470 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 471 total_size += 472 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( 473 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); 474 } 475 // repeated .corepb.GenesisTokenDistribution token_distribution = 3; 476 { 477 unsigned int count = static_cast<unsigned int>(this->token_distribution_size()); 478 total_size += 1UL * count; 479 for (unsigned int i = 0; i < count; i++) { 480 total_size += 481 ::google::protobuf::internal::WireFormatLite::MessageSize( 482 this->token_distribution(static_cast<int>(i))); 483 } 484 } 485 486 // .corepb.GenesisMeta meta = 1; 487 if (this->has_meta()) { 488 total_size += 1 + 489 ::google::protobuf::internal::WireFormatLite::MessageSize( 490 *meta_); 491 } 492 493 // .corepb.GenesisConsensus consensus = 2; 494 if (this->has_consensus()) { 495 total_size += 1 + 496 ::google::protobuf::internal::WireFormatLite::MessageSize( 497 *consensus_); 498 } 499 500 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 501 SetCachedSize(cached_size); 502 return total_size; 503 } 504 505 void Genesis::MergeFrom(const ::google::protobuf::Message& from) { 506 // @@protoc_insertion_point(generalized_merge_from_start:corepb.Genesis) 507 GOOGLE_DCHECK_NE(&from, this); 508 const Genesis* source = 509 ::google::protobuf::internal::DynamicCastToGenerated<const Genesis>( 510 &from); 511 if (source == NULL) { 512 // @@protoc_insertion_point(generalized_merge_from_cast_fail:corepb.Genesis) 513 ::google::protobuf::internal::ReflectionOps::Merge(from, this); 514 } else { 515 // @@protoc_insertion_point(generalized_merge_from_cast_success:corepb.Genesis) 516 MergeFrom(*source); 517 } 518 } 519 520 void Genesis::MergeFrom(const Genesis& from) { 521 // @@protoc_insertion_point(class_specific_merge_from_start:corepb.Genesis) 522 GOOGLE_DCHECK_NE(&from, this); 523 _internal_metadata_.MergeFrom(from._internal_metadata_); 524 ::google::protobuf::uint32 cached_has_bits = 0; 525 (void) cached_has_bits; 526 527 token_distribution_.MergeFrom(from.token_distribution_); 528 if (from.has_meta()) { 529 mutable_meta()->::corepb::GenesisMeta::MergeFrom(from.meta()); 530 } 531 if (from.has_consensus()) { 532 mutable_consensus()->::corepb::GenesisConsensus::MergeFrom(from.consensus()); 533 } 534 } 535 536 void Genesis::CopyFrom(const ::google::protobuf::Message& from) { 537 // @@protoc_insertion_point(generalized_copy_from_start:corepb.Genesis) 538 if (&from == this) return; 539 Clear(); 540 MergeFrom(from); 541 } 542 543 void Genesis::CopyFrom(const Genesis& from) { 544 // @@protoc_insertion_point(class_specific_copy_from_start:corepb.Genesis) 545 if (&from == this) return; 546 Clear(); 547 MergeFrom(from); 548 } 549 550 bool Genesis::IsInitialized() const { 551 return true; 552 } 553 554 void Genesis::Swap(Genesis* other) { 555 if (other == this) return; 556 InternalSwap(other); 557 } 558 void Genesis::InternalSwap(Genesis* other) { 559 using std::swap; 560 CastToBase(&token_distribution_)->InternalSwap(CastToBase(&other->token_distribution_)); 561 swap(meta_, other->meta_); 562 swap(consensus_, other->consensus_); 563 _internal_metadata_.Swap(&other->_internal_metadata_); 564 } 565 566 ::google::protobuf::Metadata Genesis::GetMetadata() const { 567 protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 568 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages]; 569 } 570 571 572 // =================================================================== 573 574 void GenesisMeta::InitAsDefaultInstance() { 575 } 576 #if !defined(_MSC_VER) || _MSC_VER >= 1900 577 const int GenesisMeta::kChainIdFieldNumber; 578 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 579 580 GenesisMeta::GenesisMeta() 581 : ::google::protobuf::Message(), _internal_metadata_(NULL) { 582 ::google::protobuf::internal::InitSCC( 583 &protobuf_genesis_2eproto::scc_info_GenesisMeta.base); 584 SharedCtor(); 585 // @@protoc_insertion_point(constructor:corepb.GenesisMeta) 586 } 587 GenesisMeta::GenesisMeta(const GenesisMeta& from) 588 : ::google::protobuf::Message(), 589 _internal_metadata_(NULL) { 590 _internal_metadata_.MergeFrom(from._internal_metadata_); 591 chain_id_ = from.chain_id_; 592 // @@protoc_insertion_point(copy_constructor:corepb.GenesisMeta) 593 } 594 595 void GenesisMeta::SharedCtor() { 596 chain_id_ = 0u; 597 } 598 599 GenesisMeta::~GenesisMeta() { 600 // @@protoc_insertion_point(destructor:corepb.GenesisMeta) 601 SharedDtor(); 602 } 603 604 void GenesisMeta::SharedDtor() { 605 } 606 607 void GenesisMeta::SetCachedSize(int size) const { 608 _cached_size_.Set(size); 609 } 610 const ::google::protobuf::Descriptor* GenesisMeta::descriptor() { 611 ::protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 612 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; 613 } 614 615 const GenesisMeta& GenesisMeta::default_instance() { 616 ::google::protobuf::internal::InitSCC(&protobuf_genesis_2eproto::scc_info_GenesisMeta.base); 617 return *internal_default_instance(); 618 } 619 620 621 void GenesisMeta::Clear() { 622 // @@protoc_insertion_point(message_clear_start:corepb.GenesisMeta) 623 ::google::protobuf::uint32 cached_has_bits = 0; 624 // Prevent compiler warnings about cached_has_bits being unused 625 (void) cached_has_bits; 626 627 chain_id_ = 0u; 628 _internal_metadata_.Clear(); 629 } 630 631 bool GenesisMeta::MergePartialFromCodedStream( 632 ::google::protobuf::io::CodedInputStream* input) { 633 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 634 ::google::protobuf::uint32 tag; 635 // @@protoc_insertion_point(parse_start:corepb.GenesisMeta) 636 for (;;) { 637 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 638 tag = p.first; 639 if (!p.second) goto handle_unusual; 640 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 641 // uint32 chain_id = 1; 642 case 1: { 643 if (static_cast< ::google::protobuf::uint8>(tag) == 644 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 645 646 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 647 ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>( 648 input, &chain_id_))); 649 } else { 650 goto handle_unusual; 651 } 652 break; 653 } 654 655 default: { 656 handle_unusual: 657 if (tag == 0) { 658 goto success; 659 } 660 DO_(::google::protobuf::internal::WireFormat::SkipField( 661 input, tag, _internal_metadata_.mutable_unknown_fields())); 662 break; 663 } 664 } 665 } 666 success: 667 // @@protoc_insertion_point(parse_success:corepb.GenesisMeta) 668 return true; 669 failure: 670 // @@protoc_insertion_point(parse_failure:corepb.GenesisMeta) 671 return false; 672 #undef DO_ 673 } 674 675 void GenesisMeta::SerializeWithCachedSizes( 676 ::google::protobuf::io::CodedOutputStream* output) const { 677 // @@protoc_insertion_point(serialize_start:corepb.GenesisMeta) 678 ::google::protobuf::uint32 cached_has_bits = 0; 679 (void) cached_has_bits; 680 681 // uint32 chain_id = 1; 682 if (this->chain_id() != 0) { 683 ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->chain_id(), output); 684 } 685 686 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 687 ::google::protobuf::internal::WireFormat::SerializeUnknownFields( 688 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); 689 } 690 // @@protoc_insertion_point(serialize_end:corepb.GenesisMeta) 691 } 692 693 ::google::protobuf::uint8* GenesisMeta::InternalSerializeWithCachedSizesToArray( 694 bool deterministic, ::google::protobuf::uint8* target) const { 695 (void)deterministic; // Unused 696 // @@protoc_insertion_point(serialize_to_array_start:corepb.GenesisMeta) 697 ::google::protobuf::uint32 cached_has_bits = 0; 698 (void) cached_has_bits; 699 700 // uint32 chain_id = 1; 701 if (this->chain_id() != 0) { 702 target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->chain_id(), target); 703 } 704 705 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 706 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( 707 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); 708 } 709 // @@protoc_insertion_point(serialize_to_array_end:corepb.GenesisMeta) 710 return target; 711 } 712 713 size_t GenesisMeta::ByteSizeLong() const { 714 // @@protoc_insertion_point(message_byte_size_start:corepb.GenesisMeta) 715 size_t total_size = 0; 716 717 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 718 total_size += 719 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( 720 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); 721 } 722 // uint32 chain_id = 1; 723 if (this->chain_id() != 0) { 724 total_size += 1 + 725 ::google::protobuf::internal::WireFormatLite::UInt32Size( 726 this->chain_id()); 727 } 728 729 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 730 SetCachedSize(cached_size); 731 return total_size; 732 } 733 734 void GenesisMeta::MergeFrom(const ::google::protobuf::Message& from) { 735 // @@protoc_insertion_point(generalized_merge_from_start:corepb.GenesisMeta) 736 GOOGLE_DCHECK_NE(&from, this); 737 const GenesisMeta* source = 738 ::google::protobuf::internal::DynamicCastToGenerated<const GenesisMeta>( 739 &from); 740 if (source == NULL) { 741 // @@protoc_insertion_point(generalized_merge_from_cast_fail:corepb.GenesisMeta) 742 ::google::protobuf::internal::ReflectionOps::Merge(from, this); 743 } else { 744 // @@protoc_insertion_point(generalized_merge_from_cast_success:corepb.GenesisMeta) 745 MergeFrom(*source); 746 } 747 } 748 749 void GenesisMeta::MergeFrom(const GenesisMeta& from) { 750 // @@protoc_insertion_point(class_specific_merge_from_start:corepb.GenesisMeta) 751 GOOGLE_DCHECK_NE(&from, this); 752 _internal_metadata_.MergeFrom(from._internal_metadata_); 753 ::google::protobuf::uint32 cached_has_bits = 0; 754 (void) cached_has_bits; 755 756 if (from.chain_id() != 0) { 757 set_chain_id(from.chain_id()); 758 } 759 } 760 761 void GenesisMeta::CopyFrom(const ::google::protobuf::Message& from) { 762 // @@protoc_insertion_point(generalized_copy_from_start:corepb.GenesisMeta) 763 if (&from == this) return; 764 Clear(); 765 MergeFrom(from); 766 } 767 768 void GenesisMeta::CopyFrom(const GenesisMeta& from) { 769 // @@protoc_insertion_point(class_specific_copy_from_start:corepb.GenesisMeta) 770 if (&from == this) return; 771 Clear(); 772 MergeFrom(from); 773 } 774 775 bool GenesisMeta::IsInitialized() const { 776 return true; 777 } 778 779 void GenesisMeta::Swap(GenesisMeta* other) { 780 if (other == this) return; 781 InternalSwap(other); 782 } 783 void GenesisMeta::InternalSwap(GenesisMeta* other) { 784 using std::swap; 785 swap(chain_id_, other->chain_id_); 786 _internal_metadata_.Swap(&other->_internal_metadata_); 787 } 788 789 ::google::protobuf::Metadata GenesisMeta::GetMetadata() const { 790 protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 791 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages]; 792 } 793 794 795 // =================================================================== 796 797 void GenesisConsensus::InitAsDefaultInstance() { 798 ::corepb::_GenesisConsensus_default_instance_._instance.get_mutable()->dpos_ = const_cast< ::corepb::GenesisConsensusDpos*>( 799 ::corepb::GenesisConsensusDpos::internal_default_instance()); 800 } 801 #if !defined(_MSC_VER) || _MSC_VER >= 1900 802 const int GenesisConsensus::kDposFieldNumber; 803 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 804 805 GenesisConsensus::GenesisConsensus() 806 : ::google::protobuf::Message(), _internal_metadata_(NULL) { 807 ::google::protobuf::internal::InitSCC( 808 &protobuf_genesis_2eproto::scc_info_GenesisConsensus.base); 809 SharedCtor(); 810 // @@protoc_insertion_point(constructor:corepb.GenesisConsensus) 811 } 812 GenesisConsensus::GenesisConsensus(const GenesisConsensus& from) 813 : ::google::protobuf::Message(), 814 _internal_metadata_(NULL) { 815 _internal_metadata_.MergeFrom(from._internal_metadata_); 816 if (from.has_dpos()) { 817 dpos_ = new ::corepb::GenesisConsensusDpos(*from.dpos_); 818 } else { 819 dpos_ = NULL; 820 } 821 // @@protoc_insertion_point(copy_constructor:corepb.GenesisConsensus) 822 } 823 824 void GenesisConsensus::SharedCtor() { 825 dpos_ = NULL; 826 } 827 828 GenesisConsensus::~GenesisConsensus() { 829 // @@protoc_insertion_point(destructor:corepb.GenesisConsensus) 830 SharedDtor(); 831 } 832 833 void GenesisConsensus::SharedDtor() { 834 if (this != internal_default_instance()) delete dpos_; 835 } 836 837 void GenesisConsensus::SetCachedSize(int size) const { 838 _cached_size_.Set(size); 839 } 840 const ::google::protobuf::Descriptor* GenesisConsensus::descriptor() { 841 ::protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 842 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; 843 } 844 845 const GenesisConsensus& GenesisConsensus::default_instance() { 846 ::google::protobuf::internal::InitSCC(&protobuf_genesis_2eproto::scc_info_GenesisConsensus.base); 847 return *internal_default_instance(); 848 } 849 850 851 void GenesisConsensus::Clear() { 852 // @@protoc_insertion_point(message_clear_start:corepb.GenesisConsensus) 853 ::google::protobuf::uint32 cached_has_bits = 0; 854 // Prevent compiler warnings about cached_has_bits being unused 855 (void) cached_has_bits; 856 857 if (GetArenaNoVirtual() == NULL && dpos_ != NULL) { 858 delete dpos_; 859 } 860 dpos_ = NULL; 861 _internal_metadata_.Clear(); 862 } 863 864 bool GenesisConsensus::MergePartialFromCodedStream( 865 ::google::protobuf::io::CodedInputStream* input) { 866 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 867 ::google::protobuf::uint32 tag; 868 // @@protoc_insertion_point(parse_start:corepb.GenesisConsensus) 869 for (;;) { 870 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 871 tag = p.first; 872 if (!p.second) goto handle_unusual; 873 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 874 // .corepb.GenesisConsensusDpos dpos = 1; 875 case 1: { 876 if (static_cast< ::google::protobuf::uint8>(tag) == 877 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 878 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 879 input, mutable_dpos())); 880 } else { 881 goto handle_unusual; 882 } 883 break; 884 } 885 886 default: { 887 handle_unusual: 888 if (tag == 0) { 889 goto success; 890 } 891 DO_(::google::protobuf::internal::WireFormat::SkipField( 892 input, tag, _internal_metadata_.mutable_unknown_fields())); 893 break; 894 } 895 } 896 } 897 success: 898 // @@protoc_insertion_point(parse_success:corepb.GenesisConsensus) 899 return true; 900 failure: 901 // @@protoc_insertion_point(parse_failure:corepb.GenesisConsensus) 902 return false; 903 #undef DO_ 904 } 905 906 void GenesisConsensus::SerializeWithCachedSizes( 907 ::google::protobuf::io::CodedOutputStream* output) const { 908 // @@protoc_insertion_point(serialize_start:corepb.GenesisConsensus) 909 ::google::protobuf::uint32 cached_has_bits = 0; 910 (void) cached_has_bits; 911 912 // .corepb.GenesisConsensusDpos dpos = 1; 913 if (this->has_dpos()) { 914 ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 915 1, this->_internal_dpos(), output); 916 } 917 918 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 919 ::google::protobuf::internal::WireFormat::SerializeUnknownFields( 920 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); 921 } 922 // @@protoc_insertion_point(serialize_end:corepb.GenesisConsensus) 923 } 924 925 ::google::protobuf::uint8* GenesisConsensus::InternalSerializeWithCachedSizesToArray( 926 bool deterministic, ::google::protobuf::uint8* target) const { 927 (void)deterministic; // Unused 928 // @@protoc_insertion_point(serialize_to_array_start:corepb.GenesisConsensus) 929 ::google::protobuf::uint32 cached_has_bits = 0; 930 (void) cached_has_bits; 931 932 // .corepb.GenesisConsensusDpos dpos = 1; 933 if (this->has_dpos()) { 934 target = ::google::protobuf::internal::WireFormatLite:: 935 InternalWriteMessageToArray( 936 1, this->_internal_dpos(), deterministic, target); 937 } 938 939 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 940 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( 941 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); 942 } 943 // @@protoc_insertion_point(serialize_to_array_end:corepb.GenesisConsensus) 944 return target; 945 } 946 947 size_t GenesisConsensus::ByteSizeLong() const { 948 // @@protoc_insertion_point(message_byte_size_start:corepb.GenesisConsensus) 949 size_t total_size = 0; 950 951 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 952 total_size += 953 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( 954 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); 955 } 956 // .corepb.GenesisConsensusDpos dpos = 1; 957 if (this->has_dpos()) { 958 total_size += 1 + 959 ::google::protobuf::internal::WireFormatLite::MessageSize( 960 *dpos_); 961 } 962 963 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 964 SetCachedSize(cached_size); 965 return total_size; 966 } 967 968 void GenesisConsensus::MergeFrom(const ::google::protobuf::Message& from) { 969 // @@protoc_insertion_point(generalized_merge_from_start:corepb.GenesisConsensus) 970 GOOGLE_DCHECK_NE(&from, this); 971 const GenesisConsensus* source = 972 ::google::protobuf::internal::DynamicCastToGenerated<const GenesisConsensus>( 973 &from); 974 if (source == NULL) { 975 // @@protoc_insertion_point(generalized_merge_from_cast_fail:corepb.GenesisConsensus) 976 ::google::protobuf::internal::ReflectionOps::Merge(from, this); 977 } else { 978 // @@protoc_insertion_point(generalized_merge_from_cast_success:corepb.GenesisConsensus) 979 MergeFrom(*source); 980 } 981 } 982 983 void GenesisConsensus::MergeFrom(const GenesisConsensus& from) { 984 // @@protoc_insertion_point(class_specific_merge_from_start:corepb.GenesisConsensus) 985 GOOGLE_DCHECK_NE(&from, this); 986 _internal_metadata_.MergeFrom(from._internal_metadata_); 987 ::google::protobuf::uint32 cached_has_bits = 0; 988 (void) cached_has_bits; 989 990 if (from.has_dpos()) { 991 mutable_dpos()->::corepb::GenesisConsensusDpos::MergeFrom(from.dpos()); 992 } 993 } 994 995 void GenesisConsensus::CopyFrom(const ::google::protobuf::Message& from) { 996 // @@protoc_insertion_point(generalized_copy_from_start:corepb.GenesisConsensus) 997 if (&from == this) return; 998 Clear(); 999 MergeFrom(from); 1000 } 1001 1002 void GenesisConsensus::CopyFrom(const GenesisConsensus& from) { 1003 // @@protoc_insertion_point(class_specific_copy_from_start:corepb.GenesisConsensus) 1004 if (&from == this) return; 1005 Clear(); 1006 MergeFrom(from); 1007 } 1008 1009 bool GenesisConsensus::IsInitialized() const { 1010 return true; 1011 } 1012 1013 void GenesisConsensus::Swap(GenesisConsensus* other) { 1014 if (other == this) return; 1015 InternalSwap(other); 1016 } 1017 void GenesisConsensus::InternalSwap(GenesisConsensus* other) { 1018 using std::swap; 1019 swap(dpos_, other->dpos_); 1020 _internal_metadata_.Swap(&other->_internal_metadata_); 1021 } 1022 1023 ::google::protobuf::Metadata GenesisConsensus::GetMetadata() const { 1024 protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 1025 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages]; 1026 } 1027 1028 1029 // =================================================================== 1030 1031 void GenesisConsensusDpos::InitAsDefaultInstance() { 1032 } 1033 #if !defined(_MSC_VER) || _MSC_VER >= 1900 1034 const int GenesisConsensusDpos::kDynastyFieldNumber; 1035 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 1036 1037 GenesisConsensusDpos::GenesisConsensusDpos() 1038 : ::google::protobuf::Message(), _internal_metadata_(NULL) { 1039 ::google::protobuf::internal::InitSCC( 1040 &protobuf_genesis_2eproto::scc_info_GenesisConsensusDpos.base); 1041 SharedCtor(); 1042 // @@protoc_insertion_point(constructor:corepb.GenesisConsensusDpos) 1043 } 1044 GenesisConsensusDpos::GenesisConsensusDpos(const GenesisConsensusDpos& from) 1045 : ::google::protobuf::Message(), 1046 _internal_metadata_(NULL), 1047 dynasty_(from.dynasty_) { 1048 _internal_metadata_.MergeFrom(from._internal_metadata_); 1049 // @@protoc_insertion_point(copy_constructor:corepb.GenesisConsensusDpos) 1050 } 1051 1052 void GenesisConsensusDpos::SharedCtor() { 1053 } 1054 1055 GenesisConsensusDpos::~GenesisConsensusDpos() { 1056 // @@protoc_insertion_point(destructor:corepb.GenesisConsensusDpos) 1057 SharedDtor(); 1058 } 1059 1060 void GenesisConsensusDpos::SharedDtor() { 1061 } 1062 1063 void GenesisConsensusDpos::SetCachedSize(int size) const { 1064 _cached_size_.Set(size); 1065 } 1066 const ::google::protobuf::Descriptor* GenesisConsensusDpos::descriptor() { 1067 ::protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 1068 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; 1069 } 1070 1071 const GenesisConsensusDpos& GenesisConsensusDpos::default_instance() { 1072 ::google::protobuf::internal::InitSCC(&protobuf_genesis_2eproto::scc_info_GenesisConsensusDpos.base); 1073 return *internal_default_instance(); 1074 } 1075 1076 1077 void GenesisConsensusDpos::Clear() { 1078 // @@protoc_insertion_point(message_clear_start:corepb.GenesisConsensusDpos) 1079 ::google::protobuf::uint32 cached_has_bits = 0; 1080 // Prevent compiler warnings about cached_has_bits being unused 1081 (void) cached_has_bits; 1082 1083 dynasty_.Clear(); 1084 _internal_metadata_.Clear(); 1085 } 1086 1087 bool GenesisConsensusDpos::MergePartialFromCodedStream( 1088 ::google::protobuf::io::CodedInputStream* input) { 1089 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 1090 ::google::protobuf::uint32 tag; 1091 // @@protoc_insertion_point(parse_start:corepb.GenesisConsensusDpos) 1092 for (;;) { 1093 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 1094 tag = p.first; 1095 if (!p.second) goto handle_unusual; 1096 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 1097 // repeated string dynasty = 1; 1098 case 1: { 1099 if (static_cast< ::google::protobuf::uint8>(tag) == 1100 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 1101 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 1102 input, this->add_dynasty())); 1103 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1104 this->dynasty(this->dynasty_size() - 1).data(), 1105 static_cast<int>(this->dynasty(this->dynasty_size() - 1).length()), 1106 ::google::protobuf::internal::WireFormatLite::PARSE, 1107 "corepb.GenesisConsensusDpos.dynasty")); 1108 } else { 1109 goto handle_unusual; 1110 } 1111 break; 1112 } 1113 1114 default: { 1115 handle_unusual: 1116 if (tag == 0) { 1117 goto success; 1118 } 1119 DO_(::google::protobuf::internal::WireFormat::SkipField( 1120 input, tag, _internal_metadata_.mutable_unknown_fields())); 1121 break; 1122 } 1123 } 1124 } 1125 success: 1126 // @@protoc_insertion_point(parse_success:corepb.GenesisConsensusDpos) 1127 return true; 1128 failure: 1129 // @@protoc_insertion_point(parse_failure:corepb.GenesisConsensusDpos) 1130 return false; 1131 #undef DO_ 1132 } 1133 1134 void GenesisConsensusDpos::SerializeWithCachedSizes( 1135 ::google::protobuf::io::CodedOutputStream* output) const { 1136 // @@protoc_insertion_point(serialize_start:corepb.GenesisConsensusDpos) 1137 ::google::protobuf::uint32 cached_has_bits = 0; 1138 (void) cached_has_bits; 1139 1140 // repeated string dynasty = 1; 1141 for (int i = 0, n = this->dynasty_size(); i < n; i++) { 1142 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1143 this->dynasty(i).data(), static_cast<int>(this->dynasty(i).length()), 1144 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 1145 "corepb.GenesisConsensusDpos.dynasty"); 1146 ::google::protobuf::internal::WireFormatLite::WriteString( 1147 1, this->dynasty(i), output); 1148 } 1149 1150 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 1151 ::google::protobuf::internal::WireFormat::SerializeUnknownFields( 1152 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); 1153 } 1154 // @@protoc_insertion_point(serialize_end:corepb.GenesisConsensusDpos) 1155 } 1156 1157 ::google::protobuf::uint8* GenesisConsensusDpos::InternalSerializeWithCachedSizesToArray( 1158 bool deterministic, ::google::protobuf::uint8* target) const { 1159 (void)deterministic; // Unused 1160 // @@protoc_insertion_point(serialize_to_array_start:corepb.GenesisConsensusDpos) 1161 ::google::protobuf::uint32 cached_has_bits = 0; 1162 (void) cached_has_bits; 1163 1164 // repeated string dynasty = 1; 1165 for (int i = 0, n = this->dynasty_size(); i < n; i++) { 1166 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1167 this->dynasty(i).data(), static_cast<int>(this->dynasty(i).length()), 1168 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 1169 "corepb.GenesisConsensusDpos.dynasty"); 1170 target = ::google::protobuf::internal::WireFormatLite:: 1171 WriteStringToArray(1, this->dynasty(i), target); 1172 } 1173 1174 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 1175 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( 1176 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); 1177 } 1178 // @@protoc_insertion_point(serialize_to_array_end:corepb.GenesisConsensusDpos) 1179 return target; 1180 } 1181 1182 size_t GenesisConsensusDpos::ByteSizeLong() const { 1183 // @@protoc_insertion_point(message_byte_size_start:corepb.GenesisConsensusDpos) 1184 size_t total_size = 0; 1185 1186 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 1187 total_size += 1188 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( 1189 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); 1190 } 1191 // repeated string dynasty = 1; 1192 total_size += 1 * 1193 ::google::protobuf::internal::FromIntSize(this->dynasty_size()); 1194 for (int i = 0, n = this->dynasty_size(); i < n; i++) { 1195 total_size += ::google::protobuf::internal::WireFormatLite::StringSize( 1196 this->dynasty(i)); 1197 } 1198 1199 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 1200 SetCachedSize(cached_size); 1201 return total_size; 1202 } 1203 1204 void GenesisConsensusDpos::MergeFrom(const ::google::protobuf::Message& from) { 1205 // @@protoc_insertion_point(generalized_merge_from_start:corepb.GenesisConsensusDpos) 1206 GOOGLE_DCHECK_NE(&from, this); 1207 const GenesisConsensusDpos* source = 1208 ::google::protobuf::internal::DynamicCastToGenerated<const GenesisConsensusDpos>( 1209 &from); 1210 if (source == NULL) { 1211 // @@protoc_insertion_point(generalized_merge_from_cast_fail:corepb.GenesisConsensusDpos) 1212 ::google::protobuf::internal::ReflectionOps::Merge(from, this); 1213 } else { 1214 // @@protoc_insertion_point(generalized_merge_from_cast_success:corepb.GenesisConsensusDpos) 1215 MergeFrom(*source); 1216 } 1217 } 1218 1219 void GenesisConsensusDpos::MergeFrom(const GenesisConsensusDpos& from) { 1220 // @@protoc_insertion_point(class_specific_merge_from_start:corepb.GenesisConsensusDpos) 1221 GOOGLE_DCHECK_NE(&from, this); 1222 _internal_metadata_.MergeFrom(from._internal_metadata_); 1223 ::google::protobuf::uint32 cached_has_bits = 0; 1224 (void) cached_has_bits; 1225 1226 dynasty_.MergeFrom(from.dynasty_); 1227 } 1228 1229 void GenesisConsensusDpos::CopyFrom(const ::google::protobuf::Message& from) { 1230 // @@protoc_insertion_point(generalized_copy_from_start:corepb.GenesisConsensusDpos) 1231 if (&from == this) return; 1232 Clear(); 1233 MergeFrom(from); 1234 } 1235 1236 void GenesisConsensusDpos::CopyFrom(const GenesisConsensusDpos& from) { 1237 // @@protoc_insertion_point(class_specific_copy_from_start:corepb.GenesisConsensusDpos) 1238 if (&from == this) return; 1239 Clear(); 1240 MergeFrom(from); 1241 } 1242 1243 bool GenesisConsensusDpos::IsInitialized() const { 1244 return true; 1245 } 1246 1247 void GenesisConsensusDpos::Swap(GenesisConsensusDpos* other) { 1248 if (other == this) return; 1249 InternalSwap(other); 1250 } 1251 void GenesisConsensusDpos::InternalSwap(GenesisConsensusDpos* other) { 1252 using std::swap; 1253 dynasty_.InternalSwap(CastToBase(&other->dynasty_)); 1254 _internal_metadata_.Swap(&other->_internal_metadata_); 1255 } 1256 1257 ::google::protobuf::Metadata GenesisConsensusDpos::GetMetadata() const { 1258 protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 1259 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages]; 1260 } 1261 1262 1263 // =================================================================== 1264 1265 void GenesisTokenDistribution::InitAsDefaultInstance() { 1266 } 1267 #if !defined(_MSC_VER) || _MSC_VER >= 1900 1268 const int GenesisTokenDistribution::kAddressFieldNumber; 1269 const int GenesisTokenDistribution::kValueFieldNumber; 1270 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 1271 1272 GenesisTokenDistribution::GenesisTokenDistribution() 1273 : ::google::protobuf::Message(), _internal_metadata_(NULL) { 1274 ::google::protobuf::internal::InitSCC( 1275 &protobuf_genesis_2eproto::scc_info_GenesisTokenDistribution.base); 1276 SharedCtor(); 1277 // @@protoc_insertion_point(constructor:corepb.GenesisTokenDistribution) 1278 } 1279 GenesisTokenDistribution::GenesisTokenDistribution(const GenesisTokenDistribution& from) 1280 : ::google::protobuf::Message(), 1281 _internal_metadata_(NULL) { 1282 _internal_metadata_.MergeFrom(from._internal_metadata_); 1283 address_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1284 if (from.address().size() > 0) { 1285 address_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.address_); 1286 } 1287 value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1288 if (from.value().size() > 0) { 1289 value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); 1290 } 1291 // @@protoc_insertion_point(copy_constructor:corepb.GenesisTokenDistribution) 1292 } 1293 1294 void GenesisTokenDistribution::SharedCtor() { 1295 address_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1296 value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1297 } 1298 1299 GenesisTokenDistribution::~GenesisTokenDistribution() { 1300 // @@protoc_insertion_point(destructor:corepb.GenesisTokenDistribution) 1301 SharedDtor(); 1302 } 1303 1304 void GenesisTokenDistribution::SharedDtor() { 1305 address_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1306 value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1307 } 1308 1309 void GenesisTokenDistribution::SetCachedSize(int size) const { 1310 _cached_size_.Set(size); 1311 } 1312 const ::google::protobuf::Descriptor* GenesisTokenDistribution::descriptor() { 1313 ::protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 1314 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; 1315 } 1316 1317 const GenesisTokenDistribution& GenesisTokenDistribution::default_instance() { 1318 ::google::protobuf::internal::InitSCC(&protobuf_genesis_2eproto::scc_info_GenesisTokenDistribution.base); 1319 return *internal_default_instance(); 1320 } 1321 1322 1323 void GenesisTokenDistribution::Clear() { 1324 // @@protoc_insertion_point(message_clear_start:corepb.GenesisTokenDistribution) 1325 ::google::protobuf::uint32 cached_has_bits = 0; 1326 // Prevent compiler warnings about cached_has_bits being unused 1327 (void) cached_has_bits; 1328 1329 address_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1330 value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1331 _internal_metadata_.Clear(); 1332 } 1333 1334 bool GenesisTokenDistribution::MergePartialFromCodedStream( 1335 ::google::protobuf::io::CodedInputStream* input) { 1336 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 1337 ::google::protobuf::uint32 tag; 1338 // @@protoc_insertion_point(parse_start:corepb.GenesisTokenDistribution) 1339 for (;;) { 1340 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 1341 tag = p.first; 1342 if (!p.second) goto handle_unusual; 1343 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 1344 // string address = 1; 1345 case 1: { 1346 if (static_cast< ::google::protobuf::uint8>(tag) == 1347 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 1348 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 1349 input, this->mutable_address())); 1350 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1351 this->address().data(), static_cast<int>(this->address().length()), 1352 ::google::protobuf::internal::WireFormatLite::PARSE, 1353 "corepb.GenesisTokenDistribution.address")); 1354 } else { 1355 goto handle_unusual; 1356 } 1357 break; 1358 } 1359 1360 // string value = 2; 1361 case 2: { 1362 if (static_cast< ::google::protobuf::uint8>(tag) == 1363 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 1364 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 1365 input, this->mutable_value())); 1366 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1367 this->value().data(), static_cast<int>(this->value().length()), 1368 ::google::protobuf::internal::WireFormatLite::PARSE, 1369 "corepb.GenesisTokenDistribution.value")); 1370 } else { 1371 goto handle_unusual; 1372 } 1373 break; 1374 } 1375 1376 default: { 1377 handle_unusual: 1378 if (tag == 0) { 1379 goto success; 1380 } 1381 DO_(::google::protobuf::internal::WireFormat::SkipField( 1382 input, tag, _internal_metadata_.mutable_unknown_fields())); 1383 break; 1384 } 1385 } 1386 } 1387 success: 1388 // @@protoc_insertion_point(parse_success:corepb.GenesisTokenDistribution) 1389 return true; 1390 failure: 1391 // @@protoc_insertion_point(parse_failure:corepb.GenesisTokenDistribution) 1392 return false; 1393 #undef DO_ 1394 } 1395 1396 void GenesisTokenDistribution::SerializeWithCachedSizes( 1397 ::google::protobuf::io::CodedOutputStream* output) const { 1398 // @@protoc_insertion_point(serialize_start:corepb.GenesisTokenDistribution) 1399 ::google::protobuf::uint32 cached_has_bits = 0; 1400 (void) cached_has_bits; 1401 1402 // string address = 1; 1403 if (this->address().size() > 0) { 1404 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1405 this->address().data(), static_cast<int>(this->address().length()), 1406 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 1407 "corepb.GenesisTokenDistribution.address"); 1408 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1409 1, this->address(), output); 1410 } 1411 1412 // string value = 2; 1413 if (this->value().size() > 0) { 1414 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1415 this->value().data(), static_cast<int>(this->value().length()), 1416 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 1417 "corepb.GenesisTokenDistribution.value"); 1418 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1419 2, this->value(), output); 1420 } 1421 1422 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 1423 ::google::protobuf::internal::WireFormat::SerializeUnknownFields( 1424 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); 1425 } 1426 // @@protoc_insertion_point(serialize_end:corepb.GenesisTokenDistribution) 1427 } 1428 1429 ::google::protobuf::uint8* GenesisTokenDistribution::InternalSerializeWithCachedSizesToArray( 1430 bool deterministic, ::google::protobuf::uint8* target) const { 1431 (void)deterministic; // Unused 1432 // @@protoc_insertion_point(serialize_to_array_start:corepb.GenesisTokenDistribution) 1433 ::google::protobuf::uint32 cached_has_bits = 0; 1434 (void) cached_has_bits; 1435 1436 // string address = 1; 1437 if (this->address().size() > 0) { 1438 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1439 this->address().data(), static_cast<int>(this->address().length()), 1440 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 1441 "corepb.GenesisTokenDistribution.address"); 1442 target = 1443 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1444 1, this->address(), target); 1445 } 1446 1447 // string value = 2; 1448 if (this->value().size() > 0) { 1449 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 1450 this->value().data(), static_cast<int>(this->value().length()), 1451 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 1452 "corepb.GenesisTokenDistribution.value"); 1453 target = 1454 ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1455 2, this->value(), target); 1456 } 1457 1458 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 1459 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( 1460 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); 1461 } 1462 // @@protoc_insertion_point(serialize_to_array_end:corepb.GenesisTokenDistribution) 1463 return target; 1464 } 1465 1466 size_t GenesisTokenDistribution::ByteSizeLong() const { 1467 // @@protoc_insertion_point(message_byte_size_start:corepb.GenesisTokenDistribution) 1468 size_t total_size = 0; 1469 1470 if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { 1471 total_size += 1472 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( 1473 (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); 1474 } 1475 // string address = 1; 1476 if (this->address().size() > 0) { 1477 total_size += 1 + 1478 ::google::protobuf::internal::WireFormatLite::StringSize( 1479 this->address()); 1480 } 1481 1482 // string value = 2; 1483 if (this->value().size() > 0) { 1484 total_size += 1 + 1485 ::google::protobuf::internal::WireFormatLite::StringSize( 1486 this->value()); 1487 } 1488 1489 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 1490 SetCachedSize(cached_size); 1491 return total_size; 1492 } 1493 1494 void GenesisTokenDistribution::MergeFrom(const ::google::protobuf::Message& from) { 1495 // @@protoc_insertion_point(generalized_merge_from_start:corepb.GenesisTokenDistribution) 1496 GOOGLE_DCHECK_NE(&from, this); 1497 const GenesisTokenDistribution* source = 1498 ::google::protobuf::internal::DynamicCastToGenerated<const GenesisTokenDistribution>( 1499 &from); 1500 if (source == NULL) { 1501 // @@protoc_insertion_point(generalized_merge_from_cast_fail:corepb.GenesisTokenDistribution) 1502 ::google::protobuf::internal::ReflectionOps::Merge(from, this); 1503 } else { 1504 // @@protoc_insertion_point(generalized_merge_from_cast_success:corepb.GenesisTokenDistribution) 1505 MergeFrom(*source); 1506 } 1507 } 1508 1509 void GenesisTokenDistribution::MergeFrom(const GenesisTokenDistribution& from) { 1510 // @@protoc_insertion_point(class_specific_merge_from_start:corepb.GenesisTokenDistribution) 1511 GOOGLE_DCHECK_NE(&from, this); 1512 _internal_metadata_.MergeFrom(from._internal_metadata_); 1513 ::google::protobuf::uint32 cached_has_bits = 0; 1514 (void) cached_has_bits; 1515 1516 if (from.address().size() > 0) { 1517 1518 address_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.address_); 1519 } 1520 if (from.value().size() > 0) { 1521 1522 value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); 1523 } 1524 } 1525 1526 void GenesisTokenDistribution::CopyFrom(const ::google::protobuf::Message& from) { 1527 // @@protoc_insertion_point(generalized_copy_from_start:corepb.GenesisTokenDistribution) 1528 if (&from == this) return; 1529 Clear(); 1530 MergeFrom(from); 1531 } 1532 1533 void GenesisTokenDistribution::CopyFrom(const GenesisTokenDistribution& from) { 1534 // @@protoc_insertion_point(class_specific_copy_from_start:corepb.GenesisTokenDistribution) 1535 if (&from == this) return; 1536 Clear(); 1537 MergeFrom(from); 1538 } 1539 1540 bool GenesisTokenDistribution::IsInitialized() const { 1541 return true; 1542 } 1543 1544 void GenesisTokenDistribution::Swap(GenesisTokenDistribution* other) { 1545 if (other == this) return; 1546 InternalSwap(other); 1547 } 1548 void GenesisTokenDistribution::InternalSwap(GenesisTokenDistribution* other) { 1549 using std::swap; 1550 address_.Swap(&other->address_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 1551 GetArenaNoVirtual()); 1552 value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 1553 GetArenaNoVirtual()); 1554 _internal_metadata_.Swap(&other->_internal_metadata_); 1555 } 1556 1557 ::google::protobuf::Metadata GenesisTokenDistribution::GetMetadata() const { 1558 protobuf_genesis_2eproto::protobuf_AssignDescriptorsOnce(); 1559 return ::protobuf_genesis_2eproto::file_level_metadata[kIndexInFileMessages]; 1560 } 1561 1562 1563 // @@protoc_insertion_point(namespace_scope) 1564 } // namespace corepb 1565 namespace google { 1566 namespace protobuf { 1567 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::corepb::Genesis* Arena::CreateMaybeMessage< ::corepb::Genesis >(Arena* arena) { 1568 return Arena::CreateInternal< ::corepb::Genesis >(arena); 1569 } 1570 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::corepb::GenesisMeta* Arena::CreateMaybeMessage< ::corepb::GenesisMeta >(Arena* arena) { 1571 return Arena::CreateInternal< ::corepb::GenesisMeta >(arena); 1572 } 1573 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::corepb::GenesisConsensus* Arena::CreateMaybeMessage< ::corepb::GenesisConsensus >(Arena* arena) { 1574 return Arena::CreateInternal< ::corepb::GenesisConsensus >(arena); 1575 } 1576 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::corepb::GenesisConsensusDpos* Arena::CreateMaybeMessage< ::corepb::GenesisConsensusDpos >(Arena* arena) { 1577 return Arena::CreateInternal< ::corepb::GenesisConsensusDpos >(arena); 1578 } 1579 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::corepb::GenesisTokenDistribution* Arena::CreateMaybeMessage< ::corepb::GenesisTokenDistribution >(Arena* arena) { 1580 return Arena::CreateInternal< ::corepb::GenesisTokenDistribution >(arena); 1581 } 1582 } // namespace protobuf 1583 } // namespace google 1584 1585 // @@protoc_insertion_point(global_scope)