| 1 |
/* Copyright (C) 2015 Povilas Kanapickas <[email protected]> |
| 2 |
|
| 3 |
This file is part of cppreference-doc |
| 4 |
|
| 5 |
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 |
| 6 |
Unported License. To view a copy of this license, visit |
| 7 |
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative |
| 8 |
Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. |
| 9 |
|
| 10 |
Permission is granted to copy, distribute and/or modify this document |
| 11 |
under the terms of the GNU Free Documentation License, Version 1.3 or |
| 12 |
any later version published by the Free Software Foundation; with no |
| 13 |
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. |
| 14 |
*/ |
| 15 |
|
| 16 |
#ifndef CPPREFERENCE_STREAMBUF_H |
| 17 |
#define CPPREFERENCE_STREAMBUF_H |
| 18 |
|
| 19 |
namespace std { |
| 20 |
|
| 21 |
template<class CharT, class Traits = char_traits<CharT>> |
| 22 |
class basic_streambuf { |
| 23 |
public: |
| 24 |
typedef CharT char_type; |
| 25 |
typedef Traits traits_type; |
| 26 |
typedef typename traits_type::int_type int_type; |
| 27 |
typedef typename traits_type::pos_type pos_type; |
| 28 |
typedef typename traits_type::off_type off_type; |
| 29 |
|
| 30 |
virtual ~basic_streambuf(); |
| 31 |
|
| 32 |
locale pubimbue(const locale& loc); |
| 33 |
locale getloc() const; |
| 34 |
|
| 35 |
basic_streambuf* pubsetbuf(char_type* s, streamsize n); |
| 36 |
pos_type pubseekoff(off_type off, ios_base::seekdir dir, |
| 37 |
ios_base::openmode which = ios_base::in | ios_base::out); |
| 38 |
pos_type pubseekpos(pos_type pos, |
| 39 |
ios_base::openmode which = ios_base::in | ios_base::out); |
| 40 |
int pubsync(); |
| 41 |
|
| 42 |
streamsize in_avail(); |
| 43 |
int_type snextc(); |
| 44 |
int_type sbumpc(); |
| 45 |
int_type sgetc(); |
| 46 |
streamsize sgetn(char_type* s, streamsize n); |
| 47 |
int_type sputc(char_type c); |
| 48 |
streamsize sputn(const char_type* s, streamsize n); |
| 49 |
|
| 50 |
int_type sputbackc(char_type c); |
| 51 |
int_type sungetc(); |
| 52 |
|
| 53 |
protected: |
| 54 |
basic_streambuf(); |
| 55 |
#if CPPREFERENCE_STDVER>= 2011 |
| 56 |
basic_streambuf(const basic_streambuf& rhs); |
| 57 |
basic_streambuf& operator=(const basic_streambuf& rhs); |
| 58 |
void swap(basic_streambuf& rhs); |
| 59 |
#endif |
| 60 |
|
| 61 |
virtual void imbue(const std::locale& loc); |
| 62 |
virtual basic_streambuf* setbuf(char_type* s, streamsize n); |
| 63 |
virtual pos_type seekoff(off_type off, ios_base::seekdir dir, |
| 64 |
ios_base::openmode which = ios_base::in | ios_base::out); |
| 65 |
virtual pos_type seekpos(pos_type pos, |
| 66 |
ios_base::openmode which = ios_base::in | ios_base::out); |
| 67 |
virtual int sync(); |
| 68 |
virtual streamsize showmanyc(); |
| 69 |
virtual int_type underflow(); |
| 70 |
virtual int_type uflow(); |
| 71 |
virtual streamsize xsgetn(char_type* s, streamsize n); |
| 72 |
|
| 73 |
char_type* eback() const; |
| 74 |
char_type* gptr() const; |
| 75 |
char_type* egptr() const; |
| 76 |
void gbump(int n); |
| 77 |
void setg(char_type* gbeg, char_type* gnext, char_type* gend); |
| 78 |
|
| 79 |
virtual streamsize xsputn(const char_type* s, streamsize n); |
| 80 |
virtual int_type overflow(int_type c = traits_type::eof()); |
| 81 |
char_type* pbase() const; |
| 82 |
char_type* pptr() const; |
| 83 |
char_type* epptr() const; |
| 84 |
void pbump(int n); |
| 85 |
void setp(char_type* pbeg, char_type* pend); |
| 86 |
virtual int_type pbackfail(int_type c = traits_type::eof()); |
| 87 |
}; |
| 88 |
|
| 89 |
} // namespace std |
| 90 |
|
| 91 |
#endif // CPPREFERENCE_STREAMBUF_H |