template<class Extractor>
class OpenBabel::FilteringInputStreambuf< Extractor >
Delivers characters from an istream or streambuf from a source while filtering.
Based on an article by James Kanze, "Filtering Streambufs" http://kanze.james.neuf.fr/articles/fltrsbf1.html
A FilteringInputStreambuf delivers characters on request to an istream or a destination rdbuf(). It receives them from a source rdbuf. In doing the transfer it filters them in a way decided by the class specified in template parameter Extractor.
seekg and tellg requests from the stream are passed through to source rdbuf. This allows return to a position in the input data that was previously noted. This is adequate to allow OpenBabel's fastsearch indexing, but may not be good enough for some other applications that use random access.
A class LineEndingExtractor converts DOS and MAC line endings to the UNIX line ending.
This filtering process is potentially extendable, with a chain of FilteringInputStreambufs each carrying out its filtering task. For instance a decompression streambuf could feed a LineEnding filter, which in tern was read by an input stream.