84 lines
2.3 KiB
Markdown
84 lines
2.3 KiB
Markdown
[streambuf.pub.get]
|
||
|
||
# 31 Input/output library [[input.output]](./#input.output)
|
||
|
||
## 31.6 Stream buffers [[stream.buffers]](stream.buffers#streambuf.pub.get)
|
||
|
||
### 31.6.3 Class template basic_streambuf [[streambuf]](streambuf#pub.get)
|
||
|
||
#### 31.6.3.3 Public member functions [[streambuf.members]](streambuf.members#streambuf.pub.get)
|
||
|
||
#### 31.6.3.3.3 Get area [streambuf.pub.get]
|
||
|
||
[ð](#lib:in_avail,basic_streambuf)
|
||
|
||
`streamsize in_avail();
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L3279)
|
||
|
||
*Returns*: If a read position is available, returnsegptr() - gptr()[.](#1.sentence-1)
|
||
|
||
Otherwise returns[showmanyc()](filebuf.virtuals#lib:basic_streambuf,showmanyc "31.10.3.5 Overridden virtual functions [filebuf.virtuals]")[.](#1.sentence-2)
|
||
|
||
[ð](#lib:snextc,basic_streambuf)
|
||
|
||
`int_type snextc();
|
||
`
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L3293)
|
||
|
||
*Effects*: Callssbumpc()[.](#2.sentence-1)
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L3298)
|
||
|
||
*Returns*: If that function returnstraits::eof(),
|
||
returnstraits::eof()[.](#3.sentence-1)
|
||
|
||
Otherwise, returnssgetc()[.](#3.sentence-2)
|
||
|
||
[ð](#lib:sbumpc,basic_streambuf)
|
||
|
||
`int_type sbumpc();
|
||
`
|
||
|
||
[4](#4)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L3314)
|
||
|
||
*Effects*: If the input sequence read position is not available,
|
||
returnsuflow()[.](#4.sentence-1)
|
||
|
||
Otherwise, returnstraits::to_int_type(*gptr()) and increments the next pointer for the input sequence[.](#4.sentence-2)
|
||
|
||
[ð](#lib:sgetc,basic_streambuf)
|
||
|
||
`int_type sgetc();
|
||
`
|
||
|
||
[5](#5)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L3330)
|
||
|
||
*Returns*: If the input sequence read position is not available,
|
||
returnsunderflow()[.](#5.sentence-1)
|
||
|
||
Otherwise, returnstraits::to_int_type(*gptr())[.](#5.sentence-2)
|
||
|
||
[ð](#lib:sgetn,basic_streambuf)
|
||
|
||
`streamsize sgetn(char_type* s, streamsize n);
|
||
`
|
||
|
||
[6](#6)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L3345)
|
||
|
||
*Returns*: xsgetn(s, n)[.](#6.sentence-1)
|