本文整理汇总了C++中CSVRow::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ CSVRow::begin方法的具体用法?C++ CSVRow::begin怎么用?C++ CSVRow::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSVRow
的用法示例。
在下文中一共展示了CSVRow::begin方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nrow
void TruncCommand :: ProcessRow( CSVRow & row, unsigned int ncols,
const ALib::CommaList & ) {
if ( ncols < row.size() ) {
CSVRow nrow( ncols );
std::copy( row.begin(), row.begin() + ncols, nrow.begin() );
row.swap( nrow );
}
}
示例2: display
void AbstractFileSource::display(const CSVRow& row) {
if(!row.size())
return;
CSVRowCI i=row.begin();
std::cout<<*(i++);
for(;i != row.end();++i)
std::cout<<','<<*i;
};
示例3: 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 );
}
}
示例4: Exclude
void ExcludeCommand :: Exclude( CSVRow & r ) const {
CSVRow out;
if ( mReverse ) {
std::reverse( r.begin(), r.end() );
}
for ( unsigned int i = 0; i < r.size(); i++ ) {
if ( ! ALib::Contains( mFields, i ) ) {
out.push_back( r.at( i ) );
}
}
if ( mReverse ) {
std::reverse( out.begin(), out.end() );
}
r.swap( out );
}
示例5: 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 );
}
}
}
}
示例6: formatRow
void CSVFormatter::formatRow(const CSVRow& row, UnicodeString& result, UChar32 sepchar, unsigned int varformat) {
result.remove();
UnicodeString formatted;
int lastcolumn=0;
CSVRecordMap::const_iterator iter;
for (iter=row.begin(); iter!=row.end(); ++iter) {
for (; lastcolumn<iter->first; ++lastcolumn) {
result.append(sepchar);
}
if (iter->second) {
iter->second->getValueFormatted(formatted, varformat);
// result.append(iter->second->getTypeName());
// result.append(':');
result.append(formatted);
//} else {
// result.append("[null]");
}
}
}