Name

basic_streambuf class template — Stream buffer

Synopsis

template <class charT, class traits = char_traits<charT> >
class basic_streambuf{
public:
  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(  );
   
  locale pubimbue(const locale &loc);
  locale getloc(  ) const;
  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 pubseekoff(off_type off, ios_base::seekdir way,
                      ios_base::open_mode which=ios_base::in | ios_base::out);
  pos_type pubseekpos(pos_type sp, ios_base::openmode which = ios_base::in | 
                      ios_base::out);
  pos_type pubseekpos(pos_type sp,ios_base::open_mode which);
  int pubsync(  );
  // Input
  streamsize in_avail(  );
  int_type snextc(  );
  int_type sbumpc(  );
  int_type stossc(  );
  int_type sgetc(  );
  streamsize sgetn(char_type* s, streamsize n);
  // Putback
  int_type sputbackc(char_type c);
  int_type sungetc(  );
  // Output
  int_type sputc(char_type c);
  streamsize sputn(const char_type* s, streamsize n);
protected:
  basic_streambuf(  );
  // Input
  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);
  // Output
  char_type* pbase(  ) const;
  char_type* pptr(  ) const;
  char_type* epptr( ) const; void ...

Get C++ In a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.