本文整理汇总了C++中AbstractStream::unpack方法的典型用法代码示例。如果您正苦于以下问题:C++ AbstractStream::unpack方法的具体用法?C++ AbstractStream::unpack怎么用?C++ AbstractStream::unpack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractStream
的用法示例。
在下文中一共展示了AbstractStream::unpack方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IBInstrumentationSpec
Pointer<Streamable> IBInstrumentationSpec::Factory::unpackStream(AbstractStream& stream,
const IntVector<NDIM>& /*offset*/)
{
Pointer<IBInstrumentationSpec> ret_val = new IBInstrumentationSpec();
stream.unpack(&ret_val->d_master_idx, 1);
stream.unpack(&ret_val->d_meter_idx, 1);
stream.unpack(&ret_val->d_node_idx, 1);
return ret_val;
} // unpackStream
示例2: IBTargetPointForceSpec
Pointer<Streamable>
IBTargetPointForceSpec::Factory::unpackStream(
AbstractStream& stream,
const IntVector<NDIM>& /*offset*/)
{
Pointer<IBTargetPointForceSpec> ret_val = new IBTargetPointForceSpec();
stream.unpack(&ret_val->d_master_idx,1);
stream.unpack(&ret_val->d_kappa_target,1);
stream.unpack(&ret_val->d_eta_target,1);
stream.unpack(ret_val->d_X_target.data(),NDIM);
#if ENABLE_SUBDOMAIN_INDICES
stream.unpack(&ret_val->d_subdomain_idx,1);
#endif
return ret_val;
}// unpackStream
示例3: MaterialPointSpec
Pointer<Streamable> MaterialPointSpec::Factory::unpackStream(AbstractStream& stream,
const IntVector<NDIM>& /*offset*/)
{
Pointer<MaterialPointSpec> ret_val = new MaterialPointSpec();
stream.unpack(&ret_val->d_point_idx, 1);
stream.unpack(&ret_val->d_weight, 1);
int subdomain_id;
stream.unpack(&subdomain_id, 1);
ret_val->d_subdomain_id = subdomain_id;
int n_internal_vars;
stream.unpack(&n_internal_vars, 1);
ret_val->d_internal_vars.resize(n_internal_vars);
if (n_internal_vars) stream.unpack(&ret_val->d_internal_vars[0], n_internal_vars);
return ret_val;
} // unpackStream
示例4:
void
LTransaction<T>::unpackStream(
AbstractStream& stream)
{
static const IntVector<NDIM> periodic_offset = 0;
int num_items;
stream >> num_items;
d_dst_item_set.resize(num_items);
for (typename std::vector<LTransactionComponent>::iterator it = d_dst_item_set.begin(); it != d_dst_item_set.end(); ++it)
{
it->item->unpackStream(stream, periodic_offset);
blitz::TinyVector<double,NDIM>& posn = it->posn;
stream.unpack(posn.data(),NDIM);
}
return;
}// unpackStream