libwordring
公開型 | 公開メンバ関数 | 全メンバ一覧
wordring::whatwg::encoding::io_queue< T > クラステンプレート

入出力ストリーム [詳解]

#include <terminology.hpp>

公開型

using value_type = io_item< T >
 
using character_type = T
 

公開メンバ関数

io_result< value_typeread ()
 値を一つ読み取る [詳解]
 
io_result< std::vector< value_type > > read (std::uint32_t n)
 値を読み取る [詳解]
 
io_result< std::vector< value_type > > peek (std::uint32_t n)
 Peek [詳解]
 
void push (value_type item)
 Push [詳解]
 
void push (T ch)
 
template<typename InputIterator >
void push (InputIterator first, InputIterator last)
 
void prepend (value_type item)
 Prepend [詳解]
 
void prepend (T ch)
 Prepend [詳解]
 
template<typename InputIterator >
void prepend (InputIterator first, InputIterator last)
 Prepend [詳解]
 

詳解

template<typename T>
class wordring::whatwg::encoding::io_queue< T >

入出力ストリーム

テンプレート引数
Tbyte 、 ユニコード・スカラー値、コード・ポイント等の値型
参照
https://triple-underscore.github.io/Encoding-ja.html#concept-stream

関数詳解

◆ read() [1/2]

template<typename T >
io_result<value_type> wordring::whatwg::encoding::io_queue< T >::read ( )
inline

値を一つ読み取る

戻り値
キューが空の場合、待機(m_wait == true)を返す
参照
https://encoding.spec.whatwg.org/#concept-stream-read
https://triple-underscore.github.io/Encoding-ja.html#concept-stream-read

キューが空の場合、オブジェクトは待機状態となる。 EOF は空の値とみなされないらしい。 戻り値として EOF を返す場合がある。 EOF はキューから決して取り除かれない。

◆ read() [2/2]

template<typename T >
io_result<std::vector<value_type> > wordring::whatwg::encoding::io_queue< T >::read ( std::uint32_t  n)
inline

値を読み取る

引数
[in]n読み取る個数
戻り値
キューが n に満たない場合、待機(m_wait == true)を返す
参照
https://encoding.spec.whatwg.org/#concept-stream-read
https://triple-underscore.github.io/Encoding-ja.html#concept-stream-read

一個読み取る部分で待機となるので、キューが満たない場合、オブジェクトは待機状態となる。 EOF を含む場合、 n より一つ少ない値が返される場合があり得そう。

待機状態があるため、規格から改変が必要。

◆ peek()

template<typename T >
io_result<std::vector<value_type> > wordring::whatwg::encoding::io_queue< T >::peek ( std::uint32_t  n)
inline

◆ push()

template<typename T >
void wordring::whatwg::encoding::io_queue< T >::push ( value_type  item)
inline

Push

参照
https://triple-underscore.github.io/Encoding-ja.html#concept-stream-push

二重に EOQ が追加されることは無さそう。

◆ prepend() [1/3]

template<typename T >
void wordring::whatwg::encoding::io_queue< T >::prepend ( value_type  item)
inline

◆ prepend() [2/3]

template<typename T >
void wordring::whatwg::encoding::io_queue< T >::prepend ( ch)
inline

◆ prepend() [3/3]

template<typename T >
template<typename InputIterator >
void wordring::whatwg::encoding::io_queue< T >::prepend ( InputIterator  first,
InputIterator  last 
)
inline

このクラス詳解は次のファイルから抽出されました: