本文整理汇总了C++中LineSplitter::get_stream方法的典型用法代码示例。如果您正苦于以下问题:C++ LineSplitter::get_stream方法的具体用法?C++ LineSplitter::get_stream怎么用?C++ LineSplitter::get_stream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LineSplitter
的用法示例。
在下文中一共展示了LineSplitter::get_stream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UnsupportedChunk_Ascii
// ------------------------------------------------------------------------------------------------
void COBImporter::UnsupportedChunk_Ascii(LineSplitter& splitter, const ChunkInfo& nfo, const char* name)
{
const std::string error = format("Encountered unsupported chunk: ") << name <<
" [version: "<<nfo.version<<", size: "<<nfo.size<<"]";
// we can recover if the chunk size was specified.
if(nfo.size != static_cast<unsigned int>(-1)) {
DefaultLogger::get()->error(error);
// (HACK) - our current position in the stream is the beginning of the
// head line of the next chunk. That's fine, but the caller is going
// to call ++ on `splitter`, which we need to swallow to avoid
// missing the next line.
splitter.get_stream().IncPtr(nfo.size);
splitter.swallow_next_increment();
}
else ThrowException(error);
}