This header is part of the Input/Output library.
Classes | |
abstracts a raw device (class template) | |
Typedefs | |
streambuf | basic_streambuf<char> |
wstreambuf | basic_streambuf<wchar_t> |
Synopsis
1 2 3 4 5 6 7 8 | namespace std { template < class charT, class traits = char_traits<charT> > class basic_streambuf; typedef basic_streambuf< char > streambuf; typedef basic_streambuf< wchar_t > wstreambuf; } |
Class std::basic_streambuf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | template < class charT, class traits = char_traits<charT> > class basic_streambuf { public : // types: typedef charT char_type; typedef typename traits::int_type int_type; typedef typename traits::pos_type pos_type; typedef typename traits::off_type off_type; typedef traits traits_type; virtual ~basic_streambuf(); // locales: locale pubimbue( const locale& loc); locale getloc() const ; // buffer and positioning: basic_streambuf<char_type,traits>* pubsetbuf(char_type* s, streamsize n); pos_type pubseekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in|ios_base::out); pos_type pubseekpos(pos_type sp, ios_base::openmode which = ios_base::in|ios_base::out); int pubsync(); // Get area: streamsize in_avail(); int_type snextc(); int_type sbumpc(); int_type sgetc(); streamsize sgetn(char_type* s, streamsize n); // Putback: int_type sputbackc(char_type c); int_type sungetc(); // Put area: int_type sputc(char_type c); streamsize sputn( const char_type* s, streamsize n); protected : basic_streambuf(); basic_streambuf( const basic_streambuf& rhs); basic_streambuf& operator=( const basic_streambuf& rhs); void swap(basic_streambuf& rhs); // Get area: char_type* eback() const ; char_type* gptr() const ; char_type* egptr() const ; void gbump( int n); void setg(char_type* gbeg, char_type* gnext, char_type* gend); // Put area: char_type* pbase() const ; char_type* pptr() const ; char_type* epptr() const ; void pbump( int n); void setp(char_type* pbeg, char_type* pend); // virtual functions: // Locales: virtual void imbue( const locale& loc); // Buffer management and positioning: virtual basic_streambuf<char_type,traits>* setbuf (char_type* s, streamsize n); virtual pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in|ios_base::out); virtual pos_type seekpos(pos_type sp, ios_base::openmode which = ios_base::in|ios_base::out); virtual int sync(); // Get area: virtual streamsize showmanyc(); virtual streamsize xsgetn(char_type* s, streamsize n); virtual int_type underflow(); virtual int_type uflow(); // Putback: virtual int_type pbackfail(int_type c = traits::eof()); // Put area: virtual streamsize xsputn( const char_type* s, streamsize n); virtual int_type overflow (int_type c = traits::eof()); }; |
Please login to continue.