std::strstream
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <strstream>
|
||
| class strstream : public std::iostream |
(過時了) | |
類
strstream實現陣列支持數據流的輸入和輸出操作。它實質上是封裝了一組原始I / O設備實現(std::strstreambuf)進入更高層次的介面std::basic_iostream. Original:
The class
strstream implements input and output operations on array-backed streams. It essentially wraps a raw array I/O device implementation (std::strstreambuf) into the higher-level interface of std::basic_iostream. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
典型的實現
strstream持有非衍生只有一個數據成員:一個對象類型std::strstreambuf.Original:
The typical implementation of
strstream holds only one non-derived data member: an object of type std::strstreambuf.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 成員函數
| 構造一個strstream,任選的緩衝區分配 Original: constructs an strstream, optionally allocating the buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數) | |
| [虛擬的] </ SPAN></div></div>
|
毀壞一個strstream,任選解除分配緩衝區 Original: destructs an strstream, optionally deallocating the buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (虛擬公有成員函數) |
| 求出指針相關聯的串字元流緩衝 Original: obtains a pointer to the associated strstreambuf The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數) | |
| 訪問輸出緩衝器 Original: accesses the output buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數) | |
| 禁用/啟用自動重新分配 Original: disables/enables automatic reallocation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數) | |
| 得到寫入的字元數 Original: obtains the number of characters written The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數) | |
Inherited from std::basic_istream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 提取物格式的數據 Original: extracts formatted data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 提取字元 Original: extracts characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
| 讀取下一個字元,而不提取 Original: reads the next character without extracting it The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
| unextracts一個字元 Original: unextracts a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
| 字元到輸入流 Original: puts character into input stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
| 提取字元,直到給定的字元被發現 Original: extracts characters until the given character is found The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
| 提取物和丟棄給定字元的字元,直到被發現 Original: extracts and discards characters until the given character is found The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
| 提取的字元塊 Original: extracts blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
| 提取已經可用塊的字元 Original: extracts already available blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
| 通過上次未格式化輸入操作提取的字元數返回 Original: returns number of characters extracted by last unformatted input operation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 返回輸入位置指示器 Original: returns the input position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
| sets the input position indicator (公共成員函數of std::basic_istream)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 與底層存儲設備同步 Original: synchronizes with the underlying storage device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_istream)
| |
Member classes
| implements basic logic for preparation of the stream for input operations (公共成員類of std::basic_istream)
| |
Inherited from std::basic_ostream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 插入格式化的數據 Original: inserts formatted data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ostream)
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 插入一個字元 Original: inserts a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ostream)
| |
| 插入的字元塊 Original: inserts blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ostream)
| |
Original: Positioning The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 返回的輸出位置指示器 Original: returns the output position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ostream)
| |
| 設置輸出位置指示器 Original: sets the output position indicator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ostream)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 與底層存儲設備同步 Original: synchronizes with the underlying storage device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ostream)
| |
Member classes
| 實現了基本的邏輯流輸出操作的準備 Original: implements basic logic for preparation of the stream for output operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員類of std::basic_ostream)
| |
Inherited from std::basic_ios
Member types
| 會員類型
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
CharT |
traits_type
|
Traits |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type |
off_type
|
Traits::off_type |
Original: State functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 檢查,如果沒有錯誤發生,即I / O操作都可以 Original: checks if no error has occurred i.e. I/O operations are available The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 如果最終文件的檢查已經達到了 Original: checks if end-of-file has been reached The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 如果已經發生可恢復的錯誤檢查 Original: checks if a recoverable error has occurred The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 檢查,如果已經發生了不可恢復的錯誤 Original: checks if a non-recoverable error has occurred The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 檢查如果有錯誤發生(代名詞fail()) Original: checks if an error has occurred (synonym of fail()) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| (至 C++11) (C++11 起) |
檢查,如果沒有發生錯誤(同義詞!fail()) Original: checks if no error has occurred (synonym of !fail()) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
|
| 返回狀態標誌 Original: returns state flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 設置狀態標誌 Original: sets state flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 清除錯誤和EOF標誌 Original: clears error and eof flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 格式化信息的副本 Original: copies formatting information The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 管理的填充字元 Original: manages the fill character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| manages exception mask (公共成員函數of std::basic_ios)
| |
| 設置語言環境 Original: sets the locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 管理相關的流緩衝 Original: manages associated stream buffer The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 管理綁流 Original: manages tied stream The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| 縮小字元 Original: narrows characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::basic_ios)
| |
| widens characters (公共成員函數of std::basic_ios)
| |
Inherited from std::ios_base
Member functions
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 管理格式的標誌 Original: manages format flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::ios_base)
| |
| 設置特定格式的標誌 Original: sets specific format flag The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::ios_base)
| |
| clears specific format flag (公共成員函數of std::ios_base)
| |
| 管理小數精度浮點運算 Original: manages decimal precision of floating point operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::ios_base)
| |
| manages field width (公共成員函數of std::ios_base)
| |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 設置場景 Original: sets locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::ios_base)
| |
| 返回當前的區域設置 Original: returns current locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::ios_base)
| |
Original: Internal extensible array The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| [靜態的] </ SPAN></div></div>
|
返回一個程序範圍內唯一的整數,它是安全使用指數PWORD()和iword() Original: returns a program-wide unique integer that is safe to use as index to pword() and iword() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共靜態成員函數of std::ios_base)
|
| 調整大小的私人存儲,如果必要的,訪問long元素在給定的索引 Original: resizes the private storage if necessary and access to the long element at the given index The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::ios_base)
| |
| 調整大小的私人存儲,如果必要的,訪問void*元素在給定的索引 Original: resizes the private storage if necessary and access to the void* element at the given index The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員函數of std::ios_base)
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| registers event callback function (公共成員函數of std::ios_base)
| |
| [靜態的] </ SPAN></div></div>
|
C + +和C IO庫的設置是否是可互操作的 Original: sets whether C++ and C IO libraries are interoperable The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共靜態成員函數of std::ios_base)
|
Original: Member classes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
| 流異常 Original: stream exception The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員類of std::ios_base)
| |
| 標準流對象進行初始化 Original: initializes standard stream objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (公共成員類of std::ios_base)
| |
Original: Member types and constants The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 類型
Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Explanation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 流開放的模式類型
有以下常量的定義:
Original: stream open mode type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 格式化標誌類型
有以下常量的定義:
Original: formatting flags type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 流類型的狀態
有以下常量的定義:
Original: state of the stream type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| seeking direction type
The following constants are also defined:
(的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 指定事件類型 Original: specifies event type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (枚舉) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 回調函數類型 Original: callback function type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (的typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
</div>