<sstream>
割り当てられた配列オブジェクトに格納されているシーケンスの操作だけをサポートする複数のテンプレート クラスを定義します。このようなシーケンスは、テンプレート クラス basic_stringのオブジェクトとして簡単に変換されます。
namespace std {
template<class CharType,
class Traits = char_traits<CharType>,
class Allocator = allocator<CharType> >
class basic_stringbuf;
typedef basic_stringbuf<char> stringbuf;
typedef basic_stringbuf<wchar_t> wstringbuf;
template<class CharType,
class Traits = char_traits<CharType>,
class Allocator = allocator<CharType> >
class basic_istringstream;
typedef basic_istringstream<char> istringstream;
typedef basic_istringstream<wchar_t> wistringstream;
template<class CharType,
class Traits = char_traits<CharType>,
class Allocator = allocator<CharType> >
class basic_ostringstream;
typedef basic_ostringstream<char> ostringstream;
typedef basic_ostringstream<wchar_t> wostringstream;
template<class CharType,
class Traits = char_traits<CharType>,
class Allocator = allocator<CharType> >
class basic_stringstream;
typedef basic_stringstream<char> stringstream;
typedef basic_stringstream<wchar_t> wstringstream;
// TEMPLATE FUNCTIONS
template<class CharType, class Traits, class Allocator>
void swap(
basic_stringbuf<CharType, Traits, Allocator>& _Left,
basic_stringbuf<CharType, Traits, Allocator>& _Right
);
template<class CharType, class Traits, class Allocator>
void swap(
basic_istringstream<CharType, Traits, Allocator>& _Left,
basic_istringstream<CharType, Traits, Allocator>& _Right
);
template<class CharType, class Traits, class Allocator>
void swap(
basic_ostringstream<CharType, Traits, Allocator>& _Left,
basic_ostringstream<CharType, Traits, Allocator>& _Right
);
template<class CharType, class Traits, class Allocator>
void swap (
basic_stringstream<CharType, Traits, Allocator>& _Left,
basic_stringstream<CharType, Traits, Allocator>& _Right
);
} // namespace std
パラメーター
パラメーター |
説明 |
---|---|
_Left |
sstream のオブジェクトへの参照。 |
_Right |
sstream のオブジェクトへの参照。 |
解説
型のオブジェクト char *、オーバーフローに対して <strstream> の機能を使用できます。ただし、<strstream> は推奨されておらず、<sstream> の使用は推奨します。
Typedef
char のテンプレート パラメーターに特化された型 basic_istringstream を作成します。 |
|
char のテンプレート パラメーターに特化された型 basic_ostringstream を作成します。 |
|
char のテンプレート パラメーターに特化された型 basic_stringbuf を作成します。 |
|
char のテンプレート パラメーターに特化された型 basic_stringstream を作成します。 |
|
wchar_t のテンプレート パラメーターに特化された型 basic_istringstream を作成します。 |
|
wchar_t のテンプレート パラメーターに特化された型 basic_ostringstream を作成します。 |
|
wchar_t のテンプレート パラメーターに特化された型 basic_stringbuf を作成します。 |
|
wchar_t のテンプレート パラメーターに特化された型 basic_stringstream を作成します。 |
マニピュレーター
2 sstream の二つのオブジェクトの値を交換します。 |
Classes
文字クラスのプロパティを Trによって決定される、型 Elemの要素の伝送を制御する配列オブジェクトに格納されている要素のシーケンスに対してストリームのバッファーを記述します。 |
|
オブジェクトを使用してクラス basic_stringbuf<Elem、Tr特性が、文字クラス Trによって決定され、要素が Allocのアロケーター クラスによって割り当てられた型 Elemの要素で Alloc> ストリームのバッファーからの要素とエンコードされたオブジェクトのコントロールの抽出、ついて説明します。 |
|
クラス basic_stringbuf<Elem、Tr特性が、文字クラス Trによって決定され、要素が Allocのアロケーター クラスによって割り当てられた型 Elemの要素で Alloc> ストリームのバッファーするオブジェクトを要素とエンコードされたオブジェクトのコントロールの挿入、ついて説明します。 |
|
クラス basic_stringbuf<Elem、Tr特性が、文字クラス Trによって決定され、要素が Allocのアロケーター クラスによって割り当てられた型 Elemの要素で Alloc> ストリームのバッファーを使用してオブジェクトを、要素およびエンコードされたオブジェクトのコントロールの挿入および抽出、ついて説明します。 |
必要条件
ヘッダー: <sstream>
名前空間: std