C++ Library - <basic_ios>



Introduction

Basic_ios define the components of streams that do not depend on whether the stream is an input or an output stream: ios_base describes the members that are independent of the template parameters (i.e. the character type and traits), while basic_ios describes the members that do depend on them.

Definition

Below is definition of basic_ios as shown below −

 template <class charT, class traits = char_traits<charT> > class ios_base; 

Parameters

Parameters of basic_ios should be like this −

  • parameters − Character type.

  • traits − Character traits class that defines essential properties of the characters used by stream objects (see char_traits).

Member types

Sr.No.Member typesDefinition
1eventType to indicate event type
2event_callbackEvent callback function type
3failureBase class for stream exceptions
4fmtflagsType for stream format flags
5InitInitialize standard stream objects
6iostateType for stream state flags
7openmodeType for stream opening mode flags
8seekdirType for stream seeking direction flag

Public Member Functions

Sr.No.Member typesDefinition
1(constructor)Construct object (public member function )
2(destructor)Destruct object (public member function )

State flag functions

Sr.No.Member typesDefinition
1goodIt is used to check whether state of stream is good
2eofIt is used to check whether eofbit is set
3failIt is used to check whether either failbit or badbit is set
4badIt is used to check whether badbit is set
5operator!Evaluate stream
6rdstateIt is used to get error state flags
7setstateIt is used to set error state flag
8clearIt is used to set error state flag

Formatting

Sr.No.Member typesDefinition
1copyfmtCopy formatting information
2fillGet/set fill character

Others

Sr.No.Member typesDefinition
1exceptionsIt is used to get/set exceptions mask
2imbueImbue locale
3tieIt is used to get/set tied stream
4rdbufIt is used to get/set stream buffer
5narrowNarrow character
6widenWiden character

Protected member functions

Sr.No.Member typesDefinition
1initInitialize object
2moveMove internals
3swapSwap internals
4set_rdbufIt is used to set stream buffer
ios.htm
Advertisements
close