本文整理汇总了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;
}