標準ライブラリヘッダ <ios>
提供: cppreference.com
このヘッダは入出力ライブラリの一部です。
インクルード | ||
<iosfwd> | ||
クラス | ||
フォーマットフラグと入出力例外を管理します (クラス) | ||
任意のストリームバッファを管理します (クラステンプレート) | ||
ストリームまたはファイル内の絶対位置を表します (クラステンプレート) | ||
(C++11) | iostream のエラーコード (列挙) | |
入出力ストリームのエラーコードを識別するために型特性 std::is_error_code_enum を拡張します (クラステンプレート) | ||
typedef | ||
ファイルまたはストリームの相対位置 (fpos からのオフセット) を表します。 任意のファイルサイズを表現するのに十分な大きさです (typedef) | ||
入出力操作で転送された文字数または入出力バッファのサイズを表します (typedef) | ||
関数 | ||
(C++11) | 入出力ストリームのエラーカテゴリを識別します (関数) | |
入出力ストリームのエラーコードを構築します (関数) | ||
入出力ストリームの error_condition を構築します (関数) | ||
ブーリアンの表現をテキストと数値の間で切り替えます (関数) | ||
数値の基数を表すために接頭辞を使用するかどうか制御します (関数) | ||
浮動小数点の表現に常に小数点が含まれるかどうか制御します (関数) | ||
非負の数値で + 記号を使用するかどうか制御します (関数) | ||
入力時に先行するホワイトスペースをスキップするかどうか制御します (関数) | ||
いくつかの出力書式で大文字を使用するかどうか制御します (関数) | ||
各操作ごとに出力をフラッシュするかどうか制御します (関数) | ||
フィル文字の配置を設定します (関数) | ||
整数の入出力に使用される基数を変更します (関数) | ||
(C++11)(C++11) | 浮動小数点の入出力に使用される書式を変更します (関数) |
[編集]概要
#include <iosfwd>namespace std { typedef/*implementation-defined*/ streamoff;typedef/*implementation-defined*/ streamsize; template<class stateT>class fpos; class ios_base; template<class charT, class traits = char_traits<charT>>class basic_ios; // manipulators: ios_base& boolalpha (ios_base& str); ios_base& noboolalpha(ios_base& str); ios_base& showbase (ios_base& str); ios_base& noshowbase (ios_base& str); ios_base& showpoint (ios_base& str); ios_base& noshowpoint(ios_base& str); ios_base& showpos (ios_base& str); ios_base& noshowpos (ios_base& str); ios_base& skipws (ios_base& str); ios_base& noskipws (ios_base& str); ios_base& uppercase (ios_base& str); ios_base& nouppercase(ios_base& str); ios_base& unitbuf (ios_base& str); ios_base& nounitbuf (ios_base& str); ios_base& internal (ios_base& str); ios_base& left (ios_base& str); ios_base& right (ios_base& str); ios_base& dec (ios_base& str); ios_base& hex (ios_base& str); ios_base& oct (ios_base& str); ios_base& fixed (ios_base& str); ios_base& scientific (ios_base& str); ios_base& hexfloat (ios_base& str); ios_base& defaultfloat(ios_base& str); enumclass io_errc { stream =1}; template<>struct is_error_code_enum<io_errc>:public true_type {}; error_code make_error_code(io_errc e); error_condition make_error_condition(io_errc e);const error_category& iostream_category();}
[編集]クラス std::ios_base
class ios_base {public:class failure; // fmtflagstypedef/*bitmask-type-1*/ fmtflags;staticconstexpr fmtflags boolalpha =/*unspecified*/;staticconstexpr fmtflags dec =/*unspecified*/;staticconstexpr fmtflags fixed =/*unspecified*/;staticconstexpr fmtflags hex =/*unspecified*/;staticconstexpr fmtflags internal =/*unspecified*/;staticconstexpr fmtflags left =/*unspecified*/;staticconstexpr fmtflags oct =/*unspecified*/;staticconstexpr fmtflags right =/*unspecified*/;staticconstexpr fmtflags scientific =/*unspecified*/;staticconstexpr fmtflags showbase =/*unspecified*/;staticconstexpr fmtflags showpoint =/*unspecified*/;staticconstexpr fmtflags showpos =/*unspecified*/;staticconstexpr fmtflags skipws =/*unspecified*/;staticconstexpr fmtflags unitbuf =/*unspecified*/;staticconstexpr fmtflags uppercase =/*unspecified*/;staticconstexpr fmtflags adjustfield =/*left|right|internal*/;staticconstexpr fmtflags basefield =/*dec|oct|hex*/;staticconstexpr fmtflags floatfield =/*scientific|fixed*/; // iostatetypedef/*bitmask-type-2*/ iostate;staticconstexpr iostate badbit =/*unspecified*/;staticconstexpr iostate eofbit =/*unspecified*/;staticconstexpr iostate failbit =/*unspecified*/;staticconstexpr iostate goodbit =/*0*/; // openmodetypedef/*bitmask-type-3*/ openmode;staticconstexpr openmode app =/*unspecified*/;staticconstexpr openmode ate =/*unspecified*/;staticconstexpr openmode binary =/*unspecified*/;staticconstexpr openmode in =/*unspecified*/;staticconstexpr openmode out =/*unspecified*/;staticconstexpr openmode trunc =/*unspecified*/; // seekdirtypedef/*bitmask-type-4*/ seekdir;staticconstexpr seekdir beg =/*unspecified*/;staticconstexpr seekdir cur =/*unspecified*/;staticconstexpr seekdir end =/*unspecified*/; class Init; // fmtflags state: 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:staticint xalloc();long& iword(int index);void*& pword(int index); // destructorvirtual ~ios_base(); // callbacks;enum event { erase_event, imbue_event, copyfmt_event };typedefvoid(*event_callback)(event, ios_base&, int index);void register_callback(event_callback fn, int index); ios_base(const ios_base&)= delete; ios_base& operator=(const ios_base&)= delete;staticbool sync_with_stdio(bool sync =true); protected: ios_base(); private:staticint index;// exposition onlylong* iarray;// exposition onlyvoid** parray;// exposition only};
[編集]クラス std::ios_base::failure
class ios_base::failure:public system_error {public:explicit failure(const string& msg, const error_code& ec = io_errc::stream);explicit failure(constchar* msg, const error_code& ec = io_errc::stream);};
[編集]クラス std::ios_base::Init
class ios_base::Init{public: Init(); ~Init();private:staticint init_cnt;// exposition only};
[編集]クラス std::fpos
template<class stateT>class fpos {public: stateT state()const;void state(stateT);private; stateT st;// exposition only};
[編集]クラス std::basic_ios
template<class charT, class traits = char_traits<charT>>class basic_ios :public ios_base {public:// types:typedef charT char_type;typedeftypename traits::int_type int_type;typedeftypename traits::pos_type pos_type;typedeftypename traits::off_type off_type;typedef traits traits_type; explicit operator bool()const;bool operator!()const; iostate rdstate()const;void clear(iostate state = goodbit);void setstate(iostate state);bool good()const;bool eof()const;bool fail()const;bool bad()const; iostate exceptions()const;void exceptions(iostate except); // Constructor/destructor:explicit basic_ios(basic_streambuf<charT,traits>* sb);virtual ~basic_ios(); // Members: basic_ostream<charT,traits>* tie()const; basic_ostream<charT,traits>* tie(basic_ostream<charT,traits>* tiestr); basic_streambuf<charT,traits>* rdbuf()const; basic_streambuf<charT,traits>* rdbuf(basic_streambuf<charT,traits>* sb); basic_ios& copyfmt(const basic_ios& rhs); char_type fill()const; char_type fill(char_type ch); locale imbue(const locale& loc);char narrow(char_type c, char dfault)const; char_type widen(char c)const; basic_ios(const basic_ios&)= delete; basic_ios& operator=(const basic_ios&)= delete; protected: basic_ios();void init(basic_streambuf<charT,traits>* sb);void move(basic_ios& rhs);void move(basic_ios&& rhs);void swap(basic_ios& rhs)noexcept;void set_rdbuf(basic_streambuf<charT, traits>* sb);};