template < class charT, // basic_istringstream::char_type class traits = char_traits<charT>, // basic_istringstream::traits_type class Alloc = allocator<charT> // basic_istringstream::allocator_type > class basic_istringstream;
欄位 | 成員函式 | 描述 | |
---|---|---|---|
格式化 | 格式標誌 | 標誌 setf unsetf | 一組影響某些輸入/輸出操作如何被解釋或生成的內部標誌。 參見成員型別 fmtflags。 |
欄位寬度 | 寬度 | 要插入的下一個格式化元素的寬度。 | |
顯示精度 | precision | 下一個插入的浮點值的小數精度。 | |
locale | getloc imbue | 函式用於受本地化屬性影響的格式化輸入/輸出操作的 locale 物件。 | |
填充字元 | fill | 用於將格式化欄位填充到欄位寬度(width)的字元。 | |
狀態 | 錯誤狀態 | rdstate setstate clear | 流的當前錯誤狀態。 可以透過呼叫 good、eof、fail 和 bad 來獲取單個值。 參見成員型別 iostate。 |
異常掩碼 | exceptions | 會為其丟擲 failure 異常的狀態標誌。 參見成員型別 iostate。 | |
其他 | 回撥棧 | register_callback | 指向在某些事件發生時被呼叫的函式的指標棧。 |
可擴充套件陣列 | iword pword xalloc | 用於儲存 long 和 void* 型別物件的內部陣列。 | |
繫結流 | tie | 指向輸出流的指標,該流在此流的每次 I/O 操作前被重新整理。 | |
流緩衝區 | rdbuf | 指向關聯的 basic_streambuf 物件的指標,該物件負責所有輸入/輸出操作。 | |
字元計數 | gcount | 上次未格式化輸入操作讀取的字元數(僅限輸入流)。 |
成員型別 | 定義 | 說明 |
---|---|---|
char_type | 第一個模板引數(charT) | |
traits_type | 第二個模板引數(traits) | 預設為:char_traits<charT> |
allocator_type | 第三個模板引數(Alloc) | 預設為:allocator<charT> |
int_type | traits_type::int_type | |
pos_type | traits_type::pos_type | 通常與 streampos 相同 |
off_type | traits_type::off_type | 通常與 streamoff 相同 |