Exemplo n.º 1
0
Tokenizer::Tokenizer(
    std::istream& is,
    const std::string   blankspaces,
    const std::string   separators
)
    : stream(is),
      lowercase(false)
{
    // this should be changed to deal with a !good() stream
    // appropriately
    //assert(stream.good());

    offset = stream.tellg();
    sstate = stream.rdstate();

    StreamGuard(stream, offset);

    stream.seekg(0, std::ios::end);
    offend = stream.tellg();
    stream.seekg(0, std::ios::beg);
    offbeg = stream.tellg();

    blankspaceChars(blankspaces);
    separatorChars (separators );
}
Exemplo n.º 2
0
 StreamGuard getGuardedStream(LogDetails details)
 {
     return StreamGuard(*this, details);
 }