示例#1
0
void SummaryCommand :: PrintSizes( IOManager & io, const SizeMap & sm ) {
	SizeMap::const_iterator it = sm.begin();
	while( it != sm.end() ) {
		io.Out() << it->first + 1 << ": "
				 << it->second.first << "," << it->second.second
				 << "\n";
		++it;
	}
}
示例#2
0
void ValidateCommand :: Report( IOManager & io,
								const ValidationRule::Results & res,
								int errcount ) const {
	if ( res.size() == 0 ) {
		return;
	}
	else {
		if ( errcount == 0 ) {
			io.Out() << io.CurrentFileName() << " (" << io.CurrentLine () << "): ";
			io.Out() << io.CurrentInput() << "\n";
		}
		for ( unsigned int i = 0; i < res.size(); i++ ) {
			if ( res[i].Field() > 0 ) {
				io.Out() << "    field: " << res[i].Field() << " - ";
			}
			else {
				io.Out() << "    ";
			}
			io.Out() << res[i].Msg() << "\n";
		}
	}
}