std::basic_filebuf<CharT,Traits>::showmanyc (3) - Linux Manuals
std::basic_filebuf<CharT,Traits>::showmanyc: std::basic_filebuf<CharT,Traits>::showmanyc
Command to display std::basic_filebuf<CharT,Traits>::showmanyc
manual in Linux: $ man 3 std::basic_filebuf<CharT,Traits>::showmanyc
NAME
std::basic_filebuf<CharT,Traits>::showmanyc - std::basic_filebuf<CharT,Traits>::showmanyc
Synopsis
protected:
virtual std::streamsize showmanyc()
If implemented, returns the number of characters left to read from the file.
Parameters
(none)
Return value
The number of characters available for reading from the file, or -1 if the end of file was reached.
Notes
This function is optional. If not implemented, this function returns 0 (since the base class version std::basic_streambuf::showmanyc gets called)
Whether implemented or not, this function is normally called by std::basic_streambuf::in_avail if the get area is empty.
The name of this function stands for "stream: how many characters?", so it is pronounced "S how many C", rather than "show many C"
Example
implementation test to see if showmanyc() is implemented for filebuf
// Run this code
#include <fstream>
#include <iostream>
struct mybuf : std::filebuf
{
using std::filebuf::showmanyc;
};
int main()
{
mybuf fin;
fin.open("main.cpp", std::ios_base::in);
std::cout << "showmanyc() returns " << fin.showmanyc() << '\n';
}
Possible output:
showmanyc() returns 267
See also
obtains the number of characters immediately available in the get area
in_avail (public member function of std::basic_streambuf<CharT,Traits>)
extracts already available blocks of characters
readsome (public member function of std::basic_istream<CharT,Traits>)
Pages related to std::basic_filebuf<CharT,Traits>::showmanyc
- std::basic_filebuf<CharT,Traits>::seekoff (3) - std::basic_filebuf<CharT,Traits>::seekoff
- std::basic_filebuf<CharT,Traits>::seekpos (3) - std::basic_filebuf<CharT,Traits>::seekpos
- std::basic_filebuf<CharT,Traits>::setbuf (3) - std::basic_filebuf<CharT,Traits>::setbuf
- std::basic_filebuf<CharT,Traits>::swap (3) - std::basic_filebuf<CharT,Traits>::swap
- std::basic_filebuf<CharT,Traits>::sync (3) - std::basic_filebuf<CharT,Traits>::sync
- std::basic_filebuf<CharT,Traits>::basic_filebuf (3) - std::basic_filebuf<CharT,Traits>::basic_filebuf
- std::basic_filebuf<CharT,Traits>::close (3) - std::basic_filebuf<CharT,Traits>::close
- std::basic_filebuf<CharT,Traits>::imbue (3) - std::basic_filebuf<CharT,Traits>::imbue
- std::basic_filebuf<CharT,Traits>::is_open (3) - std::basic_filebuf<CharT,Traits>::is_open
- std::basic_filebuf<CharT,Traits>::open (3) - std::basic_filebuf<CharT,Traits>::open
- std::basic_filebuf<CharT,Traits>::operator= (3) - std::basic_filebuf<CharT,Traits>::operator=
- std::basic_filebuf<CharT,Traits>::overflow (3) - std::basic_filebuf<CharT,Traits>::overflow
- std::basic_filebuf<CharT,Traits>::pbackfail (3) - std::basic_filebuf<CharT,Traits>::pbackfail
- std::basic_filebuf<CharT,Traits>::uflow (3) - std::basic_filebuf<CharT,Traits>::uflow
- std::basic_filebuf<CharT,Traits>::underflow (3) - std::basic_filebuf<CharT,Traits>::underflow
- std::basic_filebuf<CharT,Traits>::~basic_filebuf (3) - std::basic_filebuf<CharT,Traits>::~basic_filebuf
- std::basic_filebuf (3) - std::basic_filebuf
- std::basic_fstream (3) - std::basic_fstream