本文整理汇总了C++中lem::Stream::write方法的典型用法代码示例。如果您正苦于以下问题:C++ Stream::write方法的具体用法?C++ Stream::write怎么用?C++ Stream::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lem::Stream
的用法示例。
在下文中一共展示了Stream::write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SaveBin
void PatternDefaultLinkage::SaveBin( lem::Stream &bin ) const
{
bin.write_bool(optional_node);
bin.write( &marker_name, sizeof(marker_name) );
bin.write( &node_name, sizeof(node_name) );
return;
}
示例2: SaveBin
/**************************************************
Сохраняет содержимое в указанном бинарном потоке.
***************************************************/
void Word_Form::SaveBin( lem::Stream &bin ) const
{
bool p = !!name;
bin.write_bool( p );
if( p )
name->SaveBin(bin);
p = !!normalized;
bin.write_bool(p);
if(p)
normalized->SaveBin(bin);
// lexem_owner.SaveBin(bin);
// e_list.SaveBin(bin);
pair.SaveBin(bin);
// bin.write( &tfield, sizeof(tfield) );
bin.write( &entry_key, sizeof(entry_key) );
bin.write( &val, sizeof(val) );
bin.write( &score, sizeof(score) );
// bin.write( &icenter, sizeof(icenter) );
bin.write( &origin_pos, sizeof(origin_pos) );
bin.write_int( CastSizeToInt(alt.size()) );
for( lem::Container::size_type i=0; i<alt.size(); ++i )
alt[i]->SaveBin(bin);
return;
}
示例3: SaveBin
void PatternConstraint::SaveBin( lem::Stream &bin ) const
{
bin.write( &from_marker, sizeof(from_marker) );
bin.write( &to_marker, sizeof(to_marker) );
bin.write_int( from_coord_id );
bin.write_int( to_coord_id );
bin.write( &constraint_func, sizeof(constraint_func) );
return;
}
示例4: SaveBin
void PatternLink::SaveBin( lem::Stream &bin ) const
{
bin.write( &from_marker, sizeof(from_marker) );
bin.write( &from_node, sizeof(from_node) );
bin.write( &to_marker, sizeof(to_marker) );
bin.write( &to_node, sizeof(to_node) );
bin.write( &link_type, sizeof(link_type) );
bin.write_bool(optional_to_node);
return;
}
示例5: SaveBin
void LA_WordProjBuffer::SaveBin( lem::Stream &bin ) const
{
buffer.SaveBin(bin);
list.SaveBin(bin);
bin.write( &nmaxproj, sizeof(nmaxproj) );
bin.write( &n_calls, sizeof(n_calls) );
bin.write( &n_succ, sizeof(n_succ) );
bin.write( &n_succ_prim, sizeof(n_succ_prim) );
bin.write( &NTOT, sizeof(NTOT) );
bin.write( &use_compiled, sizeof(use_compiled) );
bin.write( &update_list, sizeof(update_list) );
return;
}
示例6: SaveBin
void Tree_Node::SaveBin(lem::Stream &bin) const
{
bin.write(&ilink, sizeof(ilink));
node->SaveBin(bin);
child.SaveBin(bin);
dims.SaveBin(bin);
return;
}
示例7: SaveBin
void TrFun_Lambda::SaveBin( lem::Stream& bin ) const
{
TrFunCall::SaveBin(bin);
ret_type.SaveBin(bin);
bin.write( &name, sizeof(name) );
arg_name.SaveBin(bin);
locals.SaveBin(bin);
return;
}
示例8: SaveBin
void LEMM_Compiler::SaveBin( lem::Stream & bin ) const
{
bin.write_bool(true);
const lem::uint32_t model_flags = 0x0000000E;
bin.write( &model_flags, sizeof(model_flags) );
bin.write_int( suffix_len );
bin.write_int( CastSizeToInt(suffices.size()) );
for( lem::Container::size_type i=0; i<suffices.size(); ++i )
{
bin.write( &suffices[i].first, sizeof(suffices[i].first) );
lem::Save_Packed(suffices[i].second,bin);
}
bin.write_int( CastSizeToInt(words.size()) );
for( lem::Container::size_type i=0; i<words.size(); ++i )
{
bin.write( &words[i].first, sizeof(words[i].first) );
lem::Save_Packed(words[i].second,bin);
}
bin.write_int( CastSizeToInt(ngram2.size()) );
for( lem::Container::size_type i=0; i<ngram2.size(); ++i )
bin.write( &ngram2[i], sizeof(ngram2[i]) );
bin.write_int( CastSizeToInt(ngram2_1.size()) );
for( lem::Container::size_type i=0; i<ngram2_1.size(); ++i )
bin.write( &ngram2_1[i], sizeof(ngram2_1[i]) );
bin.write_int( CastSizeToInt(ngram3.size()) );
for( lem::Container::size_type i=0; i<ngram3.size(); ++i )
bin.write( &ngram3[i], sizeof(ngram3[i]) );
bin.write_int( CastSizeToInt(ngram3_1.size()) );
for( lem::Container::size_type i=0; i<ngram3_1.size(); ++i )
bin.write( &ngram3_1[i], sizeof(ngram3_1[i]) );
bin.write_int( CastSizeToInt(ngram3_2.size()) );
for( lem::Container::size_type i=0; i<ngram3_2.size(); ++i )
bin.write( &ngram3_2[i], sizeof(ngram3_2[i]) );
bin.write_int( CastSizeToInt(ngram4.size()) );
for( lem::Container::size_type i=0; i<ngram4.size(); ++i )
bin.write( &ngram4[i], sizeof(ngram4[i]) );
return;
}
示例9: SaveBin
void SG_calibrator::SaveBin(lem::Stream &bin) const
{
bin.write_int(freq_type);
bin.write(&word, sizeof(word));
bin.write_int(id_class);
coords.SaveBin(bin);
bin.write_int(freq);
return;
}
示例10: SaveBin
void TreeDimension::SaveBin( lem::Stream &bin ) const
{
bin.write( &name, sizeof(name) );
bin.write_int( CastSizeToInt(nodes.size()) );
for( lem::Container::size_type i=0; i<nodes.size(); ++i )
nodes[i]->SaveBin(bin);
return;
}
示例11: SaveBin
void TrFun_CreateWordform::SaveBin( lem::Stream& bin ) const
{
TrFunCall::SaveBin(bin);
ientry.SaveBin(bin);
coords.SaveBin(bin);
states.SaveBin(bin);
bin.write( &form_name, sizeof(form_name) );
return;
}
示例12: Save_Packed
void UCStringSet::Save_Packed( lem::Stream &bin ) const
{
uint8_t N = size();
LEM_CHECKIT_Z( N<128 );
bin.write( &N, 1 );
for( const_iterator i=begin(); i!=end(); i++ )
lem::Save_Packed( *i, bin );
return;
}
示例13: SaveBin
void TrFunction::SaveBin( lem::Stream& bin ) const
{
bin.write( &name, sizeof(name) );
ret_type.SaveBin(bin);
arg_name.SaveBin(bin);
arg_type.SaveBin(bin);
bin.write_bool( body.NotNull() );
if( body.NotNull() )
body->SaveBin(bin);
return;
}
示例14: SaveBin
void TrType::SaveBin( lem::Stream& bin ) const
{
bin.write( &is_const, sizeof(is_const) );
bin.write( &type, sizeof(type) );
return;
}
示例15: SaveBin
void LA_ProjList::SaveBin( lem::Stream &bin ) const
{
bin.write(&Char,sizeof(Char));
Collect<LA_WordProjection>::SaveBin(bin);
return;
}