本文整理汇总了C++中CFile::DumpToStdOut方法的典型用法代码示例。如果您正苦于以下问题:C++ CFile::DumpToStdOut方法的具体用法?C++ CFile::DumpToStdOut怎么用?C++ CFile::DumpToStdOut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFile
的用法示例。
在下文中一共展示了CFile::DumpToStdOut方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
pOut->Init(&fileOut);
}
if (bDoubleLines) {
pOut->BeginPage(nPage, pPage->width,
pPage->height*2, pPage->dpi, pPage->lpi*2);
} else {
pOut->BeginPage(nPage, pPage->width,
pPage->height, pPage->dpi, pPage->lpi);
}
pOut->BlankLine();
TSFFRecord rec;
while (pInfile->GetRecord(rec))
{
switch(rec.type)
{
case NORMAL :
pOut->BlankLine();
if (pInfile->DecodeRecord(rec, pOut->GetBitSink())) {
pOut->WriteLine();
if (bDoubleLines) {
pOut->WriteLine();
}
}
if (rec.pData != 0) free(rec.pData);
break;
case USERINFO :
// not yet considered
if (rec.pData != 0) free(rec.pData);
break;
case BADLINE :
pOut->WriteLine();
if (bDoubleLines) {
pOut->WriteLine();
}
break;
case WHITESKIP :
pOut->BlankLine();
for (int j=0; j < rec.cb; ++j) {
pOut->WriteLine();
if (bDoubleLines) {
pOut->WriteLine();
}
}
break;
}
}
pOut->EndPage();
if (!bStdOut) {
if ((nFileCountOut > 1) || ((nFileCountOut == 1) && (nPage == nPageCount-1))) {
pOut->Finalize();
fileOut.Close();
if (proc.keepDate()) {
fileOut.SetModificationTime(modTime);
}
}
}
}
if (bStdOut) {
fileOut.DumpToStdOut();
fileOut.Close();
if (pOut) {
pOut->Finalize();
}
}
}
catch (const std::exception & e) {
cerr << "ERROR: " << pathInFileName.string() << ": " << e.what() << endl;
rc = 2;
}
catch (CSimpleException e) {
cerr << "ERROR: " << pathInFileName.string() << ": " << e.what() << endl;
rc = 2;
}
if (pOut) {
delete pOut;
}
if (pInfile) {
delete pInfile;
}
if (!bQuiet) cout << endl;
}
if (!bQuiet) cout << "Finished. " << endl << endl;
}
catch (const std::exception & e) {
cerr << "ERROR: " << e.what() << endl;
rc = 2;
}
catch (const CSimpleException& e) {
cerr << "ERROR: " << e.what() << endl;
rc = 2;
}
return rc;
}