當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。