本文整理汇总了C++中TextWriter::close方法的典型用法代码示例。如果您正苦于以下问题:C++ TextWriter::close方法的具体用法?C++ TextWriter::close怎么用?C++ TextWriter::close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextWriter
的用法示例。
在下文中一共展示了TextWriter::close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: close
/// <summary>
/// CSV データを書き出し、ファイルをクローズします。
/// </summary>
/// <returns>
/// なし
/// </returns>
void close()
{
if (!isOpened())
{
return;
}
if (!m_isHead)
{
nextLine();
}
m_writer.close();
}
示例2: TextWriter
XtgIm::XtgIm(QString fileName, QString enc, PageItem *textItem, bool textOnly)
{
PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("XtgIm");
bool prefix = prefs->getBool("prefix", true);
bool ask = prefs->getBool("askAgain", true);
encoding = enc;
qDebug()<<"Encoding = "<<encoding;
in_Buffer = "";
TextWriter *writer = new TextWriter(textItem->doc());
writer->open(textItem);
if (!textOnly)
{
if (ask)
{
XtgDialog* xtgdia = new XtgDialog(prefix);
if (xtgdia->exec()) {
prefix = xtgdia->usePrefix();
prefs->set("prefix", xtgdia->usePrefix());
prefs->set("askAgain", xtgdia->askAgain());
delete xtgdia;
}
else {
delete xtgdia;
return;
}
}
}
filename = fileName;
/**
This will load the xtg file into a QByte Array which will be used for
furthur parsing
*/
loadFiletoArray();
in_Buffer = toUnicode(buffer);
QString docname = filename.right(filename.length() - filename.lastIndexOf("/") - 1);
docname = docname.left(docname.lastIndexOf("."));
XtgScanner *scanner = new XtgScanner(docname,writer,in_Buffer,textOnly,prefix);
scanner->xtgParse();
writer->close();
}