cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : IOstream Library : streambuf : showmanyc
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forum
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
IOstream Library
manipulators
classes:
· filebuf
· fstream
· ifstream
· ios
· iostream
· ios_base
· istream
· istringstream
· ofstream
· ostream
· ostringstream
· streambuf
· stringbuf
· stringstream
objects:
· cerr
· cin
· clog
· cout
types:
· fpos
· streamoff
· streampos
· streamsize
streambuf
· streambuf::streambuf
· streambuf::~streambuf
public members:
· streambuf::getloc
· streambuf::in_avail
· streambuf::pubimbue
· streambuf::pubseekoff
· streambuf::pubseekpos
· streambuf::pubsetbuf
· streambuf::pubsync
· streambuf::sbumpc
· streambuf::sgetc
· streambuf::sgetn
· streambuf::snextc
· streambuf::sputbackc
· streambuf::sputc
· streambuf::sputn
· streambuf::sungetc
protected members:
· streambuf::eback
· streambuf::egptr
· streambuf::epptr
· streambuf::gbump
· streambuf::gptr
· streambuf::pbase
· streambuf::pbump
· streambuf::pptr
· streambuf::setg
· streambuf::setp
virtual prot. members:
· streambuf::imbue
· streambuf::overflow
· streambuf::pbackfail
· streambuf::seekoff
· streambuf::seekpos
· streambuf::setbuf
· streambuf::showmanyc
· streambuf::sync
· streambuf::uflow
· streambuf::underflow
· streambuf::xsgetn
· streambuf::xsputn

-

streambuf::showmanyc virtual protected member function
int showmanyc ( );

Get number of characters available in the sequence

This member function (to be read s-how-many-c) is called to get an estimate on the number of characters available in the associated input sequence when the get pointer has reached the apparent end of the associated sequence (still, characters may be available after an underflow, and their count is what the return value of this function is expected to be).

The public member function in_avail calls this protected member function to perform this action when the get pointer has reached the end pointer (or when it is set to null).

This is a virtual member function that can be redefined for a specific behavior in derived classes. Its default behavior in streambuf is to do nothing and return a value of zero.

The standard derived class filebuf overrides this member function (see filebuf::showmanyc).

Parameters

none

Return Value

An estimate on the number of characters remaining to be read in the associated character sequence after an underflow when no read positions are available at the get pointer.

Basic template member declaration

( basic_streambuf<charT,traits> )
int showmanyc ( );

See also

streambuf::in_avail Get number of characters available to read (public member function)
streambuf::underflow Get character in the case of underflow (virtual protected member function)

© The C++ Resources Network, 2000-2007 - All rights reserved
Spotted an error? - contact us