本文整理汇总了C++中IOManager::WriteRow方法的典型用法代码示例。如果您正苦于以下问题:C++ IOManager::WriteRow方法的具体用法?C++ IOManager::WriteRow怎么用?C++ IOManager::WriteRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IOManager
的用法示例。
在下文中一共展示了IOManager::WriteRow方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rg
void ShuffleCommand :: Shuffle( IOManager & io ) {
ALib::RandGen rg( mSeed );
int nout = mCount;
int last = mRows.size();
for ( unsigned int i = 0; i < mRows.size() && nout-- > 0; i++ ) {
int pos = rg.NextInt( 0, last );
io.WriteRow( mRows[pos] );
mRows[pos].swap( mRows[--last] );
}
}
示例2: DoFreq
void SummaryCommand :: DoFreq( IOManager & io ) {
CalcFreqs();
for ( unsigned int i = 0; i < mRows.size(); i++ ) {
string key = MakeKey( mRows.at(i) );
unsigned int n = mFreqMap.find( key )->second.mFreq;
CSVRow r = mRows.at(i);
r.insert( r.begin(), ALib::Str( n ) );
io.WriteRow( r );
}
}
示例3: WriteRow
void ReadXMLCommand :: WriteRow( const ALib::XMLElement * r,
IOManager & io ) {
CSVRow row;
for ( unsigned int i = 0; i < r->ChildCount(); i++ ) {
const ALib::XMLElement * ce = r->ChildElement( i );
if ( ce && ce->Name() == "td" ) {
row.push_back( TDToCSV( ce ) );
}
}
// ALib::Dump( std::cout, row );
io.WriteRow( row );
}
示例4: DoMode
void SummaryCommand :: DoMode( IOManager & io ) {
unsigned int mode = CalcFreqs();
for ( FreqMap::const_iterator it = mFreqMap.begin();
it != mFreqMap.end(); ++it ) {
if ( it->second.mFreq == mode ) {
for ( unsigned int i = 0; i < it->second.mIndex.size(); i++ ) {
CSVRow r = mRows.at( it->second.mIndex.at(i) );
r.insert( r.begin(), ALib::Str( mode ) );
io.WriteRow( r );
}
}
}
}
示例5: if
void SummaryCommand :: DoMinMax( IOManager & io ) {
CSVRow r = mRows.at(0);
for ( unsigned int i = 1; i < mRows.size(); i++ ) {
if ( mType == Min && Cmp( mRows.at(i), r ) < 0 ) {
r = mRows.at(i);
}
else if ( mType == Max && Cmp( mRows.at(i), r ) > 0 ) {
r = mRows.at(i);
}
}
for ( unsigned int i = 0; i < mRows.size(); i++ ) {
if ( Cmp( r, mRows.at(i) ) == 0 ) {
io.WriteRow( mRows.at(i) );
}
}
}