Name
ios_base class — Root class for I/O declarations
Synopsis
class ios_base{ public: class failure; typedef . . . fmtflags; typedef . . . iostate; typedef . . . io_state; typedef . . . openmode; typedef . . . open_mode; typedef . . . seekdir; typedef . . . seek_dir; typedef . . . streamoff; typedef . . . streampos; class Init; // Destructor virtual ~ios_base( ); // Formatting fmtflags flags( ) const; fmtflags flags(fmtflags fmtfl); fmtflags setf(fmtflags fmtfl); fmtflags setf(fmtflags fmtfl, fmtflags mask); void unsetf(fmtflags mask); streamsize precision( ) const; streamsize precision(streamsize prec); streamsize width( ) const; streamsize width(streamsize wide); // Locales locale imbue(const locale& loc); locale getloc( ) const; // Storage static int xalloc( ); long& iword(int index); void*& pword(int index); // Callbacks enum event { erase_event, imbue_event, copyfmt_event }; typedef void (*event_callback)(event, ios_base&, int index); void register_callback(event_callback fn, int index); static bool sync_with_stdio(bool sync = true); protected: ios_base( ); private: ios_base(const ios_base&); ios_base& operator=(const ios_base&); };
The ios_base
class is the root class for all the I/O stream classes. It declares fundamental types that are used throughout the I/O library. It also has members to keep track of formatting for input and output, storing arbitrary information for derived classes, and registering functions to be called when something interesting happens to the stream ...
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.