当前位置: 首页>>代码示例>>C++>>正文


C++ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN函数代码示例

本文整理汇总了C++中GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN函数的典型用法代码示例。如果您正苦于以下问题:C++ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN函数的具体用法?C++ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN怎么用?C++ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN

int LoginRequest::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string wb_UUID = 1;
    if (has_wb_uuid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->wb_uuid());
    }

    // optional uint32 channel = 2;
    if (has_channel()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->channel());
    }

    // optional uint32 version = 3;
    if (has_version()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->version());
    }

  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
开发者ID:wanggan768q,项目名称:GameWork,代码行数:31,代码来源:Login.pb.cpp

示例2: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN

int Sess::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string id = 1;
    if (has_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->id());
    }

    // optional int32 type = 2;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->type());
    }

    // optional int64 lasttime = 3;
    if (has_lasttime()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->lasttime());
    }

    // optional string sessid = 4;
    if (has_sessid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->sessid());
    }

    // optional int32 consvid = 5;
    if (has_consvid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->consvid());
    }

    // optional string version = 6;
    if (has_version()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->version());
    }

  }
  // repeated .gim.Pair kvs = 7;
  total_size += 1 * this->kvs_size();
  for (int i = 0; i < this->kvs_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->kvs(i));
  }

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
开发者ID:acechat,项目名称:GPush,代码行数:60,代码来源:session.pb.cpp

示例3: unknown_fields

int Person_PhoneNumber::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required string number = 1;
    if (has_number()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->number());
    }

    // optional .tutorial.Person.PhoneType type = 2 [default = HOME];
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
    }

  }
  total_size += unknown_fields().size();

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
开发者ID:1514louluo,项目名称:acl,代码行数:25,代码来源:test.pb.cpp

示例4: unknown_fields

int Port::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required int32 port_num = 1;
    if (has_port_num()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->port_num());
    }

    // required string ip = 2;
    if (has_ip()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->ip());
    }

  }
  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:zlsh80826,项目名称:SimpleP2P,代码行数:29,代码来源:port.pb.cpp

示例5: unknown_fields

int 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,代码来源:RobotCommands.pb.cpp

示例6: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN

int LanSearchRoomResponse::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required int32 jsonID = 1;
    if (has_jsonid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->jsonid());
    }

  }
  // repeated .message.LanSearchRoomResponse.room roomList = 2;
  total_size += 1 * this->roomlist_size();
  for (int i = 0; i < this->roomlist_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->roomlist(i));
  }

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
开发者ID:wanggan768q,项目名称:GameWork,代码行数:25,代码来源:LanSearchRoom.pb.cpp

示例7: unknown_fields

int 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,代码来源:InputMessage.pb.cpp

示例8: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN

void Message::SharedDtor() {
  if (to_ != &::google::protobuf::internal::kEmptyString) {
    delete to_;
  }
  if (from_ != &::google::protobuf::internal::kEmptyString) {
    delete from_;
  }
  if (sn_ != &::google::protobuf::internal::kEmptyString) {
    delete sn_;
  }
  if (data_ != &::google::protobuf::internal::kEmptyString) {
    delete data_;
  }
  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  if (this != &default_instance()) {
  #else
  if (this != default_instance_) {
  #endif
  }
}

void Message::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
开发者ID:acechat,项目名称:GPush,代码行数:26,代码来源:message.pb.cpp

示例9: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN

int BattleResultResponse::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required .message.BattleResultResponse.PlayerMatchResult result = 1;
    if (has_result()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->result());
    }

    // optional .message.UpdateUserInfo selfInfo = 2;
    if (has_selfinfo()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->selfinfo());
    }

    // optional .message.UpdateUserInfo tageterInfo = 3;
    if (has_tageterinfo()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->tageterinfo());
    }

  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
开发者ID:wanggan768q,项目名称:GameWork,代码行数:30,代码来源:BattleResult.pb.cpp

示例10: unknown_fields

int 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,代码来源:mkd.pb.cpp

示例11: unknown_fields

int AttentionMessage::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required string message = 1;
    if (has_message()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->message());
    }
    
    // optional float time_to_show = 2;
    if (has_time_to_show()) {
      total_size += 1 + 4;
    }
    
    // optional .llsf_msgs.Team team_color = 3;
    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,代码来源:AttentionMessage.pb.cpp

示例12: unknown_fields

int 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,代码来源:matches.pb.cpp

示例13: unknown_fields

int DriverStation::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required bool enabled = 1;
    if (has_enabled()) {
      total_size += 1 + 1;
    }

    // required .gazebo.msgs.DriverStation.State state = 2;
    if (has_state()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->state());
    }

  }
  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:FRCTeam1967,项目名称:FRCTeam1967,代码行数:26,代码来源:driver-station.pb.cpp

示例14: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN

int UseBuffRequest::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required string did = 1;
    if (has_did()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->did());
    }

    // required string targetUid = 2;
    if (has_targetuid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->targetuid());
    }

    // required uint32 propId = 3;
    if (has_propid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->propid());
    }

  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
开发者ID:wanggan768q,项目名称:GameWork,代码行数:31,代码来源:UseBuff.pb.cpp

示例15: unknown_fields

int 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,代码来源:CHHashFileVPlain.pb.cpp


注:本文中的GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。