本文整理汇总了C++中common::Stream::get_int64方法的典型用法代码示例。如果您正苦于以下问题:C++ Stream::get_int64方法的具体用法?C++ Stream::get_int64怎么用?C++ Stream::get_int64使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::Stream
的用法示例。
在下文中一共展示了Stream::get_int64方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deserialize
int ReportCheckBlockResponseMessage::deserialize(common::Stream& input)
{
int ret = input.get_int64(reinterpret_cast<int64_t*>(&server_id_));
if (TFS_SUCCESS == ret)
{
ret = input.get_int64(&seqno_);
}
int32_t size = 0;
if (TFS_SUCCESS == ret)
{
ret = input.get_int32(&size);
}
for (int32_t index = 0; index < size && TFS_SUCCESS == ret; index++)
{
CheckResult item;
int64_t pos = 0;
ret = item.deserialize(input.get_data(), input.get_data_length(), pos);
if (TFS_SUCCESS == ret)
{
input.drain(result_[index].length());
result_.push_back(item);
}
}
return ret;
}
示例2: deserialize
int DsCommitCompactBlockCompleteToNsMessage::deserialize(common::Stream& input)
{
int32_t ret = input.get_int64(&seqno_);
if (common::TFS_SUCCESS == ret)
{
int64_t pos = 0;
ret = block_info_.deserialize(input.get_data(), input.get_data_length(), pos);
}
int8_t size = 0;
if (common::TFS_SUCCESS == ret)
{
input.drain(block_info_.length());
ret = input.get_int8(&size);
}
if (common::TFS_SUCCESS == ret)
{
for (int8_t index = 0; index < size && common::TFS_SUCCESS == ret; ++index)
{
std::pair<uint64_t, int8_t> item;
ret = input.get_int64(reinterpret_cast<int64_t*>(&item.first));
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int8(&item.second);
}
if (common::TFS_SUCCESS == ret)
{
result_.push_back(item);
}
}
}
return ret;
}
示例3: deserialize
int ECMarshallingMessage::deserialize(common::Stream& input)
{
int32_t ret = input.get_int64(&family_id_);
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int64(&seqno_);
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int32(&expire_time_);
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int32(&family_aid_info_);
}
if (common::TFS_SUCCESS == ret)
{
const int32_t MEMBER_NUM = GET_DATA_MEMBER_NUM(family_aid_info_) + GET_CHECK_MEMBER_NUM(family_aid_info_);
ret = (MEMBER_NUM > 0 && MEMBER_NUM <= MAX_MARSHALLING_NUM) ? common::TFS_SUCCESS : common::EXIT_PARAMETER_ERROR;
if (TFS_SUCCESS == ret)
{
family_members_ = new (std::nothrow)FamilyMemberInfo[MEMBER_NUM];
assert(family_members_);
for (int32_t index = 0; index < MEMBER_NUM && TFS_SUCCESS == ret; ++index)
{
int64_t pos = 0;
ret = family_members_[index].deserialize(input.get_data(), input.get_data_length() , pos);
if (TFS_SUCCESS == ret)
input.drain(family_members_[index].length());
}
}
}
return ret;
}
示例4: deserialize
int GetTableFromRtsResponseMessage::deserialize(common::Stream& input)
{
int32_t iret = input.get_int64(&version_);
if (common::TFS_SUCCESS == iret)
{
iret = input.get_int64(&length_);
}
if (common::TFS_SUCCESS == iret)
{
iret = input.get_bytes(tables_, length_);
}
return iret;
}
示例5: deserialize
int ResolveBlockVersionConflictMessage::deserialize(common::Stream& input)
{
int32_t size = 0;
int32_t ret = input.get_int32(reinterpret_cast<int32_t*>(&block_));
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int32(&size);
}
if (common::TFS_SUCCESS == ret)
{
std::pair<uint64_t, common::BlockInfo> item;
for (int32_t index = 0; index < size && common::TFS_SUCCESS == ret; ++index)
{
ret = input.get_int64(reinterpret_cast<int64_t*>(&item.first));
if (common::TFS_SUCCESS == ret)
{
int64_t pos = 0;
ret = item.second.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == ret)
input.drain(item.second.length());
}
if (common::TFS_SUCCESS == ret)
{
members_.push_back(item);
}
}
}
return ret;
}
示例6: deserialize
int BlockWriteCompleteMessage::deserialize(common::Stream& input)
{
int32_t ret = input.get_int64( reinterpret_cast<int64_t*> (&server_id_));
if (common::TFS_SUCCESS == ret)
{
int64_t pos = 0;
ret = block_info_.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == ret)
{
input.drain(block_info_.length());
}
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int32(reinterpret_cast<int32_t*> (&lease_id_));
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int32(reinterpret_cast<int32_t*> (&write_complete_status_));
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int32(reinterpret_cast<int32_t*> (&unlink_flag_));
}
return ret;
}
示例7: deserialize
int GetFamilyInfoMessage::deserialize(common::Stream& input)
{
int32_t ret = input.get_int32(&mode_);
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int64(&family_id_);
}
return ret;
}
示例8: deserialize
int WriteDataResponseMessage::deserialize(common::Stream& input)
{
int32_t ret = input.get_int64(reinterpret_cast<int64_t*>(&server_));
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int64(&offset_);
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int32(&status_);
}
if (common::TFS_SUCCESS == ret)
{
int64_t pos = 0;
ret = info_.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == ret)
input.drain(info_.length());
}
return ret;
}
示例9: deserialize
int WriteRawIndexMessage::deserialize(common::Stream& input)
{
uint32_t index_count = 0;
int32_t iret = input.get_int32((int32_t*)&block_id_);
if (common::TFS_SUCCESS == iret)
{
iret = input.get_int64(&family_id_);
}
if (common::TFS_SUCCESS == iret)
{
iret = input.get_int32(reinterpret_cast<int32_t*>(&index_op_));
}
if (common::TFS_SUCCESS == iret)
{
iret = input.get_int32((int32_t*)&index_count);
}
index_vec_.clear();
for (uint32_t i = 0; i < index_count && common::TFS_SUCCESS == iret; i++)
{
common::RawIndex index;
if (common::TFS_SUCCESS == iret)
{
iret = input.get_int32((int32_t*)&index.block_id_);
}
if (common::TFS_SUCCESS == iret)
{
iret = input.get_int32((int32_t*)&index.size_);
}
if (index.size_ > 0)
{
index.data_ = input.get_data();
input.drain(index.size_);
}
index_vec_.push_back(index);
}
return iret;
}
示例10: deserialize
int MasterAndSlaveHeartMessage::deserialize(common::Stream& input)
{
int64_t pos = 0;
int32_t ret = ns_identity_.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == ret)
{
input.drain(ns_identity_.length());
}
if (common::TFS_SUCCESS == ret)
{
if (input.get_data_length() > 0)
ret = input.get_int64(&lease_id_);
}
if (common::TFS_SUCCESS == ret)
{
if (input.get_data_length() > 0)
ret = input.get_int8(&keepalive_type_);
}
return ret;
}
示例11: deserialize
int UnlinkFileMessage::deserialize(common::Stream& input)
{
int64_t pos = 0;
int32_t ret = unlink_file_info_.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == ret)
{
input.drain(unlink_file_info_.length());
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_vint64(dataservers_);
}
if (common::TFS_SUCCESS == ret)
{
input.get_int32(&option_flag_);
}
if (common::TFS_SUCCESS == ret)
{
BasePacket::parse_special_ds(dataservers_, version_, lease_id_);
}
if ((common::TFS_SUCCESS == ret) && input.get_data_length() > 0)
{
ret = input.get_int64(reinterpret_cast<int64_t*>(&lease_id_ext_));
}
if (common::TFS_SUCCESS == ret && input.get_data_length() > 0)
{
int64_t pos = 0;
ret = family_info_.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == ret)
{
input.drain(family_info_.length());
}
}
return ret;
}