58 template<
class Extractor >
63 std::istream* source = NULL) ;
73 virtual std::streampos
seekoff(std::streamoff off, std::ios_base::seekdir way,
74 std::ios_base::openmode which = std::ios_base::in | std::ios_base::out )
76 setg( &myBuffer , &myBuffer , &myBuffer ) ;
77 mySource->seekg(off, way);
78 std::streampos ret = mySource->tellg();
83 virtual std::streampos
seekpos(std::streampos sp,
84 std::ios_base::openmode which = std::ios_base::in | std::ios_base::out )
86 setg( &myBuffer , &myBuffer , &myBuffer ) ;
91 std::streampos ret = mySource->tellg();
105 mySource = newsource;
106 setg( &myBuffer , &myBuffer , &myBuffer + 1 ) ;
112 std::istream* mySource ;
113 Extractor myExtractor ;
118 template<
class Extractor >
120 std::istream* source )
123 setg( &myBuffer , &myBuffer , &myBuffer ) ;
127 template<
class Extractor >
132 if( gptr() < egptr() )
134 else if ( mySource != NULL )
136 result = myExtractor( *mySource ) ;
139 if( result < 0 || result > UCHAR_MAX )
140 std::cerr <<
"FilteringInputStreambuf error" << std::endl;
142 setg( &myBuffer , &myBuffer , &myBuffer + 1 ) ;
149 template<
class Extractor >
154 if ( mySource != NULL )
156 if ( gptr() < egptr() )
158 mySource->putback(*gptr() ) ;
159 setg( &myBuffer , &myBuffer , &myBuffer ) ;
161 result = mySource->sync();
174 int ch( src.get() ) ;
194 template <
class Extractor >
211 #endif //OB_LINEEND_H 212
Global namespace for all Open Babel code.
Definition: alias.h:22