这篇教程C++ unknown_fields函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中unknown_fields函数的典型用法代码示例。如果您正苦于以下问题:C++ unknown_fields函数的具体用法?C++ unknown_fields怎么用?C++ unknown_fields使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了unknown_fields函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: unknown_fieldsint SimTimeSync::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // required .llsf_msgs.Time sim_time = 1; if (has_sim_time()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( this->sim_time()); } // required float real_time_factor = 2; if (has_real_time_factor()) { total_size += 1 + 4; } // required bool paused = 3; if (has_paused()) { total_size += 1 + 1; } } 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;}
开发者ID:F34140r,项目名称:gazebo-plugins,代码行数:32,
示例2: unknown_fieldsint RceQueryPvE::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // optional int32 type = 1; if (has_type()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->type()); } // optional int32 pass = 2; if (has_pass()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->pass()); } } if (!unknown_fields().empty()) { total_size += ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( unknown_fields()); } _cached_size_ = total_size; return total_size;}
开发者ID:CrazyPro,项目名称:ape,代码行数:27,
示例3: unknown_fields::google::protobuf::uint8* ImageMessage::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:ImageMessage) // required uint32 width = 1; if (has_width()) { target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->width(), target); } // required uint32 height = 2; if (has_height()) { target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->height(), target); } // required bytes data = 3; if (has_data()) { target = ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( 3, this->data(), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:ImageMessage) return target;}
开发者ID:arpg,项目名称:UnrealSim,代码行数:27,
示例4: unknown_fieldsvoid CSCreateRoomRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); }}
开发者ID:MicroBlogProjects,项目名称:IceBurning,代码行数:7,
示例5: WriteMessageNoVirtualToArray::google::protobuf::uint8* RseObtainSocialItems::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // optional string wishlist = 1; if (_has_bit(0)) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->wishlist().data(), this->wishlist().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->wishlist(), target); } // repeated .MsgItem ItemsList = 2; for (int i = 0; i < this->itemslist_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( 2, this->itemslist(i), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } return target;}
开发者ID:CrazyPro,项目名称:ape,代码行数:25,
示例6: unknown_fieldsint InputMessage::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // required bool ahead = 1; if (has_ahead()) { total_size += 1 + 1; } // required bool back = 2; if (has_back()) { total_size += 1 + 1; } // required bool left = 3; if (has_left()) { total_size += 1 + 1; } // required bool right = 4; if (has_right()) { total_size += 1 + 1; } } 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;}
开发者ID:arpg,项目名称:UnrealSim,代码行数:35,
示例7: unknown_fieldsvoid RseAuthState::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_); if (raw_buffer != NULL) { RseAuthState::SerializeWithCachedSizesToArray(raw_buffer); return; } // required bool pass = 1; if (_has_bit(0)) { ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->pass(), output); } // required int32 type = 2; if (_has_bit(1)) { ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->type(), output); } // required int32 leftMin = 3; if (_has_bit(2)) { ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->leftmin(), output); } if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); }}
开发者ID:CrazyPro,项目名称:ape,代码行数:28,
示例8: unknown_fields::google::protobuf::uint8* Port::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // @@protoc_insertion_point(serialize_to_array_start:port.Port) // required int32 port_num = 1; if (has_port_num()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->port_num(), target); } // required string ip = 2; if (has_ip()) { ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( this->ip().data(), this->ip().length(), ::google::protobuf::internal::WireFormat::SERIALIZE, "ip"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->ip(), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } // @@protoc_insertion_point(serialize_to_array_end:port.Port) return target;}
开发者ID:zlsh80826,项目名称:SimpleP2P,代码行数:26,
示例9: WriteMessageNoVirtualToArray::google::protobuf::uint8* MatchesProto::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // optional fixed64 imageLseq = 1; if (has_imagelseq()) { target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(1, this->imagelseq(), target); } // optional fixed64 imageRseq = 2; if (has_imagerseq()) { target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(2, this->imagerseq(), target); } // repeated .sfm.DMatches matches = 3; for (int i = 0; i < this->matches_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( 3, this->matches(i), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } return target;}
开发者ID:ZhangPeike,项目名称:Android-SfM-client,代码行数:25,
示例10: unknown_fieldsint MatchesProto::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // optional fixed64 imageLseq = 1; if (has_imagelseq()) { total_size += 1 + 8; } // optional fixed64 imageRseq = 2; if (has_imagerseq()) { total_size += 1 + 8; } } // repeated .sfm.DMatches matches = 3; total_size += 1 * this->matches_size(); for (int i = 0; i < this->matches_size(); i++) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( this->matches(i)); } 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;}
开发者ID:ZhangPeike,项目名称:Android-SfM-client,代码行数:33,
示例11: unknown_fieldsint MFNHashFilePlainProtobuf::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // optional uint32 hash_length_bytes = 1; if (has_hash_length_bytes()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::UInt32Size( this->hash_length_bytes()); } } // repeated string hash_value = 2; total_size += 1 * this->hash_value_size(); for (int i = 0; i < this->hash_value_size(); i++) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( this->hash_value(i)); } 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;}
开发者ID:locktide,项目名称:rh_project,代码行数:29,
示例12: unknown_fieldsint PriceInfo::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // required int32 price = 1; if (has_price()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->price()); } // required int32 size = 2; if (has_size()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( this->size()); } // required .acm.Side side = 3; if (has_side()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->side()); } } 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;}
开发者ID:zyongxu,项目名称:codetest,代码行数:35,
示例13: WriteMessageNoVirtualToArray::google::protobuf::uint8* MFNHashFileSaltedProtobuf::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // optional uint32 hash_length_bytes = 1; if (has_hash_length_bytes()) { target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->hash_length_bytes(), target); } // optional uint32 salt_length_bytes = 2; if (has_salt_length_bytes()) { target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->salt_length_bytes(), target); } // repeated .MFNHashFileSaltedProtobuf.SaltedHash salted_hash_value = 3; for (int i = 0; i < this->salted_hash_value_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( 3, this->salted_hash_value(i), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } return target;}
开发者ID:Debug-Orz,项目名称:sploit-dev,代码行数:25,
示例14: WriteMessageNoVirtualToArray::google::protobuf::uint8* MktData::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // optional int32 secu_id = 1 [default = 0]; if (has_secu_id()) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->secu_id(), target); } // optional string instrument = 2 [default = ""]; if (has_instrument()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->instrument().data(), this->instrument().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->instrument(), target); } // repeated .acm.PriceInfo quotes = 3; for (int i = 0; i < this->quotes_size(); i++) { target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( 3, this->quotes(i), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } return target;}
开发者ID:zyongxu,项目名称:codetest,代码行数:30,
示例15: unknown_fieldsvoid AttentionMessage::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { // required string message = 1; if (has_message()) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->message().data(), this->message().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); ::google::protobuf::internal::WireFormatLite::WriteString( 1, this->message(), output); } // optional float time_to_show = 2; if (has_time_to_show()) { ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->time_to_show(), output); } // optional .llsf_msgs.Team team_color = 3; if (has_team_color()) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 3, this->team_color(), output); } if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); }}
开发者ID:adrianohrl,项目名称:ros_robotino,代码行数:27,
示例16: unknown_fieldsvoid RseObtainSocialItems::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { ::google::protobuf::uint8* raw_buffer = output->GetDirectBufferForNBytesAndAdvance(_cached_size_); if (raw_buffer != NULL) { RseObtainSocialItems::SerializeWithCachedSizesToArray(raw_buffer); return; } // optional string wishlist = 1; if (_has_bit(0)) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->wishlist().data(), this->wishlist().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); ::google::protobuf::internal::WireFormatLite::WriteString( 1, this->wishlist(), output); } // repeated .MsgItem ItemsList = 2; for (int i = 0; i < this->itemslist_size(); i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageNoVirtual( 2, this->itemslist(i), output); } if (!unknown_fields().empty()) { ::google::protobuf::internal::WireFormat::SerializeUnknownFields( unknown_fields(), output); }}
开发者ID:CrazyPro,项目名称:ape,代码行数:28,
示例17: unknown_fields::google::protobuf::uint8* RceUpdateMisc::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // optional int32 planetId = 1; if (_has_bit(0)) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->planetid(), target); } // optional string action = 2; if (_has_bit(1)) { ::google::protobuf::internal::WireFormat::VerifyUTF8String( this->action().data(), this->action().length(), ::google::protobuf::internal::WireFormat::SERIALIZE); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->action(), target); } // optional int32 wk = 3; if (_has_bit(2)) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->wk(), target); } // optional int32 chk = 4; if (_has_bit(3)) { target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->chk(), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } return target;}
开发者ID:CrazyPro,项目名称:ape,代码行数:33,
示例18: unknown_fieldsint SetRobotMaintenance::ByteSize() const { int total_size = 0; if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { // required uint32 robot_number = 1; if (has_robot_number()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::UInt32Size( this->robot_number()); } // required bool maintenance = 3; if (has_maintenance()) { total_size += 1 + 1; } // required .llsf_msgs.Team team_color = 4; if (has_team_color()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->team_color()); } } 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;}
开发者ID:adrianohrl,项目名称:ros_robotino,代码行数:33,
示例19: WriteMessageNoVirtualToArray::google::protobuf::uint8* SimTimeSync::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { // required .llsf_msgs.Time sim_time = 1; if (has_sim_time()) { target = ::google::protobuf::internal::WireFormatLite:: WriteMessageNoVirtualToArray( 1, this->sim_time(), target); } // required float real_time_factor = 2; if (has_real_time_factor()) { target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->real_time_factor(), target); } // required bool paused = 3; if (has_paused()) { target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->paused(), target); } if (!unknown_fields().empty()) { target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( unknown_fields(), target); } return target;}
开发者ID:F34140r,项目名称:gazebo-plugins,代码行数:25,
注:本文中的unknown_fields函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ unless函数代码示例 C++ unknown函数代码示例 |