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


C++ TextWriter::setStream方法代码示例

本文整理汇总了C++中TextWriter::setStream方法的典型用法代码示例。如果您正苦于以下问题:C++ TextWriter::setStream方法的具体用法?C++ TextWriter::setStream怎么用?C++ TextWriter::setStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextWriter的用法示例。


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

示例1: printSeed

void FeatureInvestigator::printSeed (Persistance::TextTableReport::Output& out, 
                                     Feature& feature, 
                                     const PositionVector& positions)
{
   int currentField = Persistance::TextTableReport::firstFieldIndex;
   Persistance::TextTableReport::Data data (_seedFormat);

   TextWriter writer (NULL);

	//
	// print all scores
	Scores::Score_ptr score = feature.score ();
	while (score) {
      writer.setStream (data.getOutputStream(currentField++));
      writer << (- score->log10Score ());
		score = score->next ();
	}

   //
   // print the assignment
   writer.setStream (data.getOutputStream(currentField++));
   writer << _parameters.langauge ().format (feature.assignment ());

   //
   // print score params if available
   writer.setStream (data.getOutputStream(currentField++));
	feature.score ()->writeAsText (writer);

	/*
   if (feature.scoreParameters ()) {
      writer << '[';
      feature.scoreFunction ().writeAsText (writer, feature.scoreParameters ());
      writer << ']';
   }*/

   //
   // print projection details if available
   writer.setStream (data.getOutputStream(currentField++));
   if (feature.projection ()) {
      writer << _parameters.langauge ().format (*feature.projection ());
   }
/*
   //
   // print how many seeds counted for bonf correction, if available
   writer.setStream (data.getOutputStream(currentField++));
   if (feature.numSeedsSearched () > 0) {
      writer << feature.numSeedsSearched();
   }
*/

   writer.setStream (NULL);
   out << data;
}
开发者ID:BackupTheBerlios,项目名称:snap-svn,代码行数:53,代码来源:Feature.cpp


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