Showing content from https://cplusplus.com/basic_istream below:
class template
<istream> <iostream>
std::basic_istream
template <class charT, class traits = char_traits<charT> > class basic_istream;
Input stream
Input stream objects can read and interpret input from sequences of characters. Specific members are provided to perform these input operations (see functions below).
The standard objects cin and wcin use particular instantiations of this class template.
Objects of these classes keep a set of internal fields inherited from ios_base and basic_ios:
field member functions description Formatting format flags flags
setf
unsetf A set of internal flags that affect how certain input/output operations are interpreted or generated.
See member type fmtflags. field width width Width of the next formatted element to insert. display precision precision Decimal precision for the next floating-point value inserted. locale getloc
imbue The locale object used by the function for formatted input/output operations affected by localization properties. fill character fill Character to pad a formatted field up to the field width (width). State error state rdstate
setstate
clear The current error state of the stream.
Individual values may be obtained by calling good, eof, fail and bad.
See member type iostate. exception mask exceptions The state flags for which a failure exception is thrown.
See member type iostate. Other callback stack register_callback Stack of pointers to functions that are called when certain events occur. extensible arrays iword
pword
xalloc Internal arrays to store objects of type long
and void*
. tied stream tie Pointer to output stream that is flushed before each i/o operation on this stream. stream buffer rdbuf Pointer to the associated basic_streambuf object, which is charge of all input/output operations.
To these, basic_istream adds the character count (accessible using member gcount).
Template parameters
-
charT
-
Character type.
This shall be a non-array POD type.
Aliased as member type basic_istream::char_type.
-
traits
-
Character traits class that defines essential properties of the characters used by stream objects (see char_traits).
traits::char_type shall be the same as charT.
Aliased as member type basic_istream::traits_type.
Template instantiations
-
istream
-
Input stream (class)
-
wistream
-
Input stream (wide) (class)
These instantiations are declared in <istream>, which is included by reference in <iostream>.
Member types The class contains the following member class:
-
sentry
-
Prepare stream for input (public member class)
Along with the following member types:
member type definition notes char_type The first template parameter (charT) traits_type The second template parameter (traits) defaults to: char_traits<charT>
int_type traits_type::int_type
pos_type traits_type::pos_type
generally, the same as streampos off_type traits_type::off_type
generally, the same as streamoff And these member types inherited from ios_base through basic_ios:
-
event
-
Type to indicate event type (public member type)
-
event_callback
-
Event callback function type (public member type)
-
failure
-
Base class for stream exceptions (public member class)
-
fmtflags
-
Type for stream format flags (public member type)
-
Init
-
Initialize standard stream objects (public member class)
-
iostate
-
Type for stream state flags (public member type)
-
openmode
-
Type for stream opening mode flags (public member type)
-
seekdir
-
Type for stream seeking direction flag (public member type)
Public member functions
-
(constructor)
-
Construct object (public member function)
-
(destructor)
-
Destroy object (public member function)
Formatted input:
-
operator>>
-
Extract formatted input (public member function)
Unformatted input:
-
gcount
-
Get character count (public member function)
-
get
-
Get characters (public member function)
-
getline
-
Get line (public member function)
-
ignore
-
Extract and discard characters (public member function)
-
peek
-
Peek next character (public member function)
-
read
-
Read block of data (public member function)
-
readsome
-
Read data available in buffer (public member function)
-
putback
-
Put character back (public member function)
-
unget
-
Unget character (public member function)
Positioning:
-
tellg
-
Get position in input sequence (public member function)
-
seekg
-
Set position in input sequence (public member function)
Synchronization:
-
sync
-
Synchronize input buffer (public member function)
Protected member functions
-
operator=
-
Move assignment (protected member function)
-
swap
-
Swap internals (protected member function)
Public member functions inherited from basic_ios
-
good
-
Check whether state of stream is good (public member function)
-
eof
-
Check whether eofbit is set (public member function)
-
fail
-
Check whether failbit or badbit is set (public member function)
-
bad
-
Check whether badbit is set (public member function)
-
operator!
-
Evaluate stream (not) (public member function)
-
operator bool
-
Evaluate stream (public member function)
-
rdstate
-
Get error state flags (public member function)
-
setstate
-
Set error state flag (public member function)
-
clear
-
Set error state flags (public member function)
-
copyfmt
-
Copy formatting information (public member function)
-
fill
-
Get/set fill character (public member function)
-
exceptions
-
Get/set exceptions mask (public member function)
-
imbue
-
Imbue locale (public member function)
-
tie
-
Get/set tied stream (public member function)
-
rdbuf
-
Get/set stream buffer (public member function)
-
narrow
-
Narrow character (public member function)
-
widen
-
Widen character (public member function)
Public member functions inherited from ios_base
-
flags
-
Get/set format flags (public member function)
-
setf
-
Set specific format flags (public member function)
-
unsetf
-
Clear specific format flags (public member function)
-
precision
-
Get/Set floating-point decimal precision (public member function)
-
width
-
Get/set field width (public member function)
-
imbue
-
Imbue locale (public member function)
-
getloc
-
Get current locale (public member function)
-
xalloc
-
Get new index for extensible array [static] (public static member function)
-
iword
-
Get integer element of extensible array (public member function)
-
pword
-
Get pointer element of extensible array (public member function)
-
register_callback
-
Register event callback function (public member function)
-
sync_with_stdio
-
Toggle synchronization with cstdio streams [static] (public static member function)
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4