CommonLibrary  0.9.0
const_indexer_iterator< Container, Indexer, Value > クラステンプレート

添字演算用関数オブジェクト(Indexer)を利用した定数反復子 (base_indexer_iteratorからの派生) [詳解]

const_indexer_iterator< Container, Indexer, Value > の継承関係図
base_indexer_iterator< Value, const Container, const Value *, const Value &, Indexer >

公開メンバ関数

 const_indexer_iterator (const Container &container, Indexer indexer)
 対象のコンテナ Container と添字計算用関数オブジェクト Indexer を指定して構築 [詳解]
 
 const_indexer_iterator (const base_indexer_iterator< Value, const Container, const Value *, const Value &, Indexer > &it)
 base_indexer_iterator からのコピー・コンストラクタ [詳解]
 
 const_indexer_iterator (const indexer_iterator< Container, Indexer, Value > &it)
 indexer_iterator からのコピー・コンストラクタ [詳解]
 
const_indexer_iterator end ()
 末尾の次の反復子を返す [詳解]
 
const_indexer_iteratoroperator++ ()
 インクリメント演算子(前置演算子) [詳解]
 
const_indexer_iterator operator++ (int)
 インクリメント演算子(後置演算子) [詳解]
 
const_indexer_iteratoroperator-- ()
 デクリメント演算子(前置演算子) [詳解]
 
const_indexer_iterator operator-- (int)
 デクリメント演算子(後置演算子) [詳解]
 
const_indexer_iteratoroperator+= (typename base_iterator::difference_type i)
 加算・代入演算子 [詳解]
 
const_indexer_iteratoroperator-= (typename base_iterator::difference_type i)
 減算・代入演算子 [詳解]
 
- 基底クラス base_indexer_iterator< Value, const Container, const Value *, const Value &, Indexer > に属する継承公開メンバ関数
 base_indexer_iterator (const Container &container, Indexer indexer)
 対象のコンテナ Container と添字計算用関数オブジェクト Indexer を指定して構築 [詳解]
 
reference operator[] (difference_type i)
 添字演算子 [詳解]
 
reference at (difference_type i)
 指定した添字の値への参照を返す(範囲チェック付き) [詳解]
 
reference at () const
 現在位置の値への参照を返す(範囲チェック付き) [詳解]
 
reference operator* () const
 参照演算子 [詳解]
 
pointer operator-> () const
 ポインタ演算子 [詳解]
 
pointer pointTo () const
 ポインタ演算子(範囲チェック付き) [詳解]
 
bool operator== (const base_indexer_iterator &p) const
 等号演算子 [詳解]
 
bool operator!= (const base_indexer_iterator &p) const
 不等号演算子 [詳解]
 
bool operator< (const base_indexer_iterator &p) const
 比較演算子(より小さい) [詳解]
 
bool operator> (const base_indexer_iterator &p) const
 比較演算子(より大きい) [詳解]
 
bool operator<= (const base_indexer_iterator &p) const
 比較演算子(以下) [詳解]
 
bool operator>= (const base_indexer_iterator &p) const
 比較演算子(以上) [詳解]
 
difference_type operator- (const base_indexer_iterator &p) const
 二つの反復子間の距離を返す [詳解]
 

その他の継承メンバ

- 基底クラス base_indexer_iterator< Value, const Container, const Value *, const Value &, Indexer > に属する継承公開型
typedef Value value_type
 要素の値の型
 
typedef std::ptrdiff_t difference_type
 反復子どうしの距離の型
 
typedef size_t size_type
 サイズの型
 
typedef const Value * pointer
 ポインタの型
 
typedef const Value & reference
 参照の型
 
- 基底クラス base_indexer_iterator< Value, const Container, const Value *, const Value &, Indexer > に属する継承限定公開メンバ関数
 ~base_indexer_iterator ()
 デストラクタ [詳解]
 
- 基底クラス base_indexer_iterator< Value, const Container, const Value *, const Value &, Indexer > に属する継承限定公開変数類
const Container * container_
 対象のコンテナ
 
Indexer indexer_
 添字計算用関数オブジェクト
 
difference_type ci_
 現在位置
 

詳解

template<class Container, class Indexer, class Value = typename Container::value_type>
class const_indexer_iterator< Container, Indexer, Value >

添字演算用関数オブジェクト(Indexer)を利用した定数反復子 (base_indexer_iteratorからの派生)

コンテナやランダム・アクセス反復子の添字演算子を利用して反復処理を行うための反復子。 コンテナはランダム・アクセス反復子を持つことを前提としている( コンテナの添字反復子 ( operator[] ) を利用する )。

実体は base_indexer_iterator のテンプレート引数 Pointer と Reference を、 コンテナの要素に対する const ポインタ・const 参照としたものである。

Indexer として SliceIndexer または SymMatIndexer の利用を想定している。

構築子と解体子

◆ const_indexer_iterator() [1/3]

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator< Container, Indexer, Value >::const_indexer_iterator ( const Container &  container,
Indexer  indexer 
)
inline

対象のコンテナ Container と添字計算用関数オブジェクト Indexer を指定して構築

覚え書き
対象のコンテナに固定の配列を利用する場合、Container として "Value *const" を指定する必要がある。 例えば indexer_iterator< int *const, SliceIndexer, int > など。
引数
container対象のコンテナへの参照(Container)
indexer添字計算用関数オブジェクト(Indexer)

◆ const_indexer_iterator() [2/3]

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator< Container, Indexer, Value >::const_indexer_iterator ( const base_indexer_iterator< Value, const Container, const Value *, const Value &, Indexer > &  it)
inline

base_indexer_iterator からのコピー・コンストラクタ

引数
it対象の base_indexer_iterator

◆ const_indexer_iterator() [3/3]

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator< Container, Indexer, Value >::const_indexer_iterator ( const indexer_iterator< Container, Indexer, Value > &  it)
inline

indexer_iterator からのコピー・コンストラクタ

通常の indexer_iterator を定数反復子に変換するために必要となる。

引数
it対象の indexer_iterator

関数詳解

◆ end()

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator const_indexer_iterator< Container, Indexer, Value >::end ( )
inline

末尾の次の反復子を返す

末尾の次の反復子

◆ operator++() [1/2]

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator& const_indexer_iterator< Container, Indexer, Value >::operator++ ( )
inline

インクリメント演算子(前置演算子)

戻り値
インクリメント後の反復子

◆ operator++() [2/2]

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator const_indexer_iterator< Container, Indexer, Value >::operator++ ( int  )
inline

インクリメント演算子(後置演算子)

戻り値
インクリメント前の反復子

◆ operator--() [1/2]

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator& const_indexer_iterator< Container, Indexer, Value >::operator-- ( )
inline

デクリメント演算子(前置演算子)

戻り値
デクリメント後の反復子

◆ operator--() [2/2]

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator const_indexer_iterator< Container, Indexer, Value >::operator-- ( int  )
inline

デクリメント演算子(後置演算子)

戻り値
デクリメント前の反復子

◆ operator+=()

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator& const_indexer_iterator< Container, Indexer, Value >::operator+= ( typename base_iterator::difference_type  i)
inline

加算・代入演算子

引数
i加算数
戻り値
加算後の反復子

◆ operator-=()

template<class Container , class Indexer , class Value = typename Container::value_type>
const_indexer_iterator& const_indexer_iterator< Container, Indexer, Value >::operator-= ( typename base_iterator::difference_type  i)
inline

減算・代入演算子

引数
i減算数
戻り値
減算後の反復子

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