libwordring
公開型 | 公開メンバ関数 | 静的公開変数類 | 限定公開変数類 | フレンド | 全メンバ一覧
wordring::deserialize_iterator< Value, ForwardIterator > クラステンプレート

バイト列に対するイテレータを任意型の整数を返すイテレータへ変換する [詳解]

#include <wordring/serialize/serialize_iterator.hpp>

公開型

using iterator_type = ForwardIterator
 
using unsigned_type = std::make_unsigned_t< Value >
 
using difference_type = std::ptrdiff_t
 
using value_type = Value
 
using pointer = value_type *
 
using reference = value_type &
 
using iterator_category = std::input_iterator_tag
 

公開メンバ関数

 deserialize_iterator (iterator_type it)
 
value_type operator* () const
 
deserialize_iteratoroperator++ ()
 
deserialize_iterator operator++ (int)
 

静的公開変数類

static constexpr std::uint32_t coefficient = sizeof(unsigned_type)
 

限定公開変数類

iterator_type m_it
 

フレンド

template<typename Value1 , typename ForwardIterator1 >
bool operator== (deserialize_iterator< Value1, ForwardIterator1 > const &, deserialize_iterator< Value1, ForwardIterator1 > const &)
 
template<typename Value1 , typename ForwardIterator1 >
bool operator!= (deserialize_iterator< Value1, ForwardIterator1 > const &, deserialize_iterator< Value1, ForwardIterator1 > const &)
 

詳解

template<typename Value, typename ForwardIterator>
class wordring::deserialize_iterator< Value, ForwardIterator >

バイト列に対するイテレータを任意型の整数を返すイテレータへ変換する

テンプレート引数
Value返す値の型
InputIterator整数列に対する入力イテレータ
std::string s{ '\x1', '\x23', '\x45', '\x67', '\x89', '\xAB','\xCD', '\xEF' };
auto it1 = deserialize_iterator<std::uint32_t, decltype(s.begin())>(s.begin());
auto it2 = deserialize_iterator<std::uint32_t, decltype(s.begin())>(s.end());
std::cout << std::hex;
while (it1 != it2) std::cout << *it1++ << std::endl;
出力
1234567
89abcdef
参照
wordring::serialize_iterator

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