|
MGL(Win32)
|
動的2次元配列クラス [詳解]
#include <mgl_array_2d.h>
公開メンバ関数 | |
| Array2D (Array2D &)=delete | |
| Array2D & | operator= (Array2D &)=delete |
| Array2D (Memory::ClearMode clearMode=Memory::ClearMode::Auto) noexcept | |
| コンストラクタ | |
| Array2D (IndexType width, IndexType height, Memory::ClearMode clearMode=Memory::ClearMode::Auto) noexcept | |
| コンストラクタ | |
| Array2D (IndexType width, IndexType height, const ValueType &invalidValue, Memory::ClearMode clearMode=Memory::ClearMode::Auto) noexcept | |
| コンストラクタ | |
| Array2D (IndexType width, IndexType height, ValueType &&invalidValue, Memory::ClearMode clearMode=Memory::ClearMode::Auto) noexcept | |
| コンストラクタ | |
| Array2D (Array2D &&rhs) noexcept | |
| ムーブコンストラクタ | |
| Array2D & | operator= (Array2D &&rhs) noexcept |
| ムーブ代入 | |
| ~Array2D () noexcept | |
| デストラクタ | |
| bool | New (size_t width, size_t height, Memory::ClearMode clearMode=Memory::ClearMode::Auto) noexcept |
| 配列の生成 | |
| bool | Renew (Memory::ClearMode clearMode=Memory::ClearMode::Auto) noexcept |
| 配列を同じサイズで構築し直す | |
| constexpr void | Fill (const ValueType &value) noexcept |
| 全ての要素を指定値で書き込む | |
| constexpr const ValueType & | Get (IndexType x, IndexType y) const noexcept |
| 要素の取得 | |
| const ValueType & | Get (const std::pair< IndexType, IndexType > &pair) const noexcept |
| 要素の取得 | |
| const ValueType & | operator[] (const std::pair< IndexType, IndexType > &pair) const noexcept |
| 添字演算子による要素の取得 | |
| constexpr ValueType * | GetPtr (IndexType x, IndexType y) const noexcept |
| 書き込み可能な要素へのポインタを取得 | |
| constexpr ValueType * | GetPtr (const std::pair< IndexType, IndexType > &pair) const noexcept |
| 書き込み可能な要素へのポインタを取得 | |
| template<class LoopBody > | |
| constexpr void | ForEach (LoopBody body) noexcept |
| 全ての要素へのアクセス | |
| template<class LoopBody > | |
| constexpr void | ForEach (LoopBody body) const noexcept |
| 全ての要素へ読み取り専用でアクセス | |
| template<class LoopBody > | |
| constexpr void | ForRange (IndexType beginX, IndexType beginY, IndexType endX, IndexType endY, LoopBody body) noexcept |
| 範囲を指定して要素にアクセス | |
| template<class LoopBody > | |
| constexpr void | ForRange (const std::pair< IndexType, IndexType > &begin, const std::pair< IndexType, IndexType > &end, LoopBody body) noexcept |
| 範囲を指定して要素にアクセス | |
| template<class LoopBody > | |
| constexpr void | ForRange (IndexType beginX, IndexType beginY, IndexType endX, IndexType endY, LoopBody body) const noexcept |
| 範囲を指定して読み取り専用で要素にアクセス | |
| template<class LoopBody > | |
| constexpr void | ForRange (const std::pair< IndexType, IndexType > &begin, const std::pair< IndexType, IndexType > &end, LoopBody body) const noexcept |
| 範囲を指定して読み取り専用で要素にアクセス | |
| constexpr bool | Contains (const ValueType &element) const noexcept |
| 指定した要素が範囲内に含まれているかを取得 | |
| constexpr bool | Contains (const ValueType *element) const noexcept |
| 指定した要素が範囲内に含まれているかを取得 | |
| constexpr void | SetInvalidValue (const ValueType &value) noexcept |
| 無効値の設定 | |
| constexpr void | SetInvalidValue (ValueType &&value) noexcept |
| 無効値の設定 | |
| constexpr IndexType | GetWidth () const noexcept |
| 配列のX方向の最大値を取得 | |
| constexpr IndexType | GetHeight () const noexcept |
| 配列のY方向の最大値を取得 | |
| constexpr size_t | GetArraySize () const noexcept |
| 配列全体のサイズを取得 | |
| constexpr ValueType * | begin () const noexcept |
| 先頭の要素を取得 | |
| constexpr ValueType * | end () const noexcept |
| 末尾の要素を取得 | |
| constexpr const ValueType * | cbegin () const noexcept |
| 先頭の要素をconstで取得 | |
| constexpr const ValueType * | cend () const noexcept |
| 末尾の要素をconstで取得 | |
静的公開メンバ関数 | |
| static constexpr std::pair< IndexType, IndexType > | MakePair (IndexType x, IndexType y) noexcept |
| ペアの生成 | |
動的2次元配列クラス
| ValueType | 配列が扱う型 |
|
inlinenoexcept |
コンストラクタ
| [in] | clearMode | メモリ領域の初期化方法 |
|
inlinenoexcept |
コンストラクタ
| [in] | width | X方向の最大値 |
| [in] | height | Y方向の最大値 |
| [in] | clearMode | メモリ領域の初期化方法 |
|
inlinenoexcept |
コンストラクタ
| [in] | width | X方向の最大値 |
| [in] | height | Y方向の最大値 |
| [in] | invalidValue | 無効値として設定する値 |
| [in] | clearMode | メモリ領域の初期化方法 |
|
inlinenoexcept |
コンストラクタ
| [in] | width | X方向の最大値 |
| [in] | height | Y方向の最大値 |
| [in] | invalidValue | 無効値として設定する値(右辺値参照) |
| [in] | clearMode | メモリ領域の初期化方法 |
|
inlinenoexcept |
ムーブコンストラクタ
| [in] | rhs | 右辺値 |
|
inlinenodiscardconstexprnoexcept |
先頭の要素を取得
|
inlinenodiscardconstexprnoexcept |
先頭の要素をconstで取得
|
inlinenodiscardconstexprnoexcept |
末尾の要素をconstで取得
|
inlinenodiscardconstexprnoexcept |
指定した要素が範囲内に含まれているかを取得
| [in] | element | チェックする要素の参照 |
| true | 範囲内に含まれている要素である |
| false | 範囲内の要素ではない |
|
inlinenodiscardconstexprnoexcept |
指定した要素が範囲内に含まれているかを取得
| [in] | element | チェックする要素のポインタ |
| true | 範囲内に含まれている要素である |
| false | 範囲内の要素ではない |
|
inlinenodiscardconstexprnoexcept |
末尾の要素を取得
|
inlineconstexprnoexcept |
全ての要素を指定値で書き込む
| [in] | value | 書き込む値 |
|
inlineconstexprnoexcept |
全ての要素へ読み取り専用でアクセス
| LoopBody | 要素にアクセスするための関数オブジェクトの型 |
| [in] | body | 要素にアクセスするための関数オブジェクト |
|
inlineconstexprnoexcept |
全ての要素へのアクセス
| LoopBody | 要素にアクセスするための関数オブジェクトの型 |
| [in] | body | 要素にアクセスするための関数オブジェクト |
|
inlineconstexprnoexcept |
範囲を指定して読み取り専用で要素にアクセス
| LoopBody | 要素にアクセスするための関数オブジェクトの型 |
| [in] | begin | 開始位置のXとYのペア |
| [in] | end | 終了位置のXとYのペア |
| [in] | body | 要素にアクセスするための関数オブジェクト |
|
inlineconstexprnoexcept |
範囲を指定して要素にアクセス
| LoopBody | 要素にアクセスするための関数オブジェクトの型 |
| [in] | begin | 開始位置のXとYのペア |
| [in] | end | 終了位置のXとYのペア |
| [in] | body | 要素にアクセスするための関数オブジェクト |
|
inlineconstexprnoexcept |
範囲を指定して読み取り専用で要素にアクセス
| LoopBody | 要素にアクセスするための関数オブジェクトの型 |
| [in] | beginX | X座標の開始位置 |
| [in] | beginY | Y座標の開始位置 |
| [in] | endX | X座標の終了位置 |
| [in] | endY | Y座標の終了位置 |
| [in] | body | 要素にアクセスするための関数オブジェクト |
|
inlineconstexprnoexcept |
範囲を指定して要素にアクセス
| LoopBody | 要素にアクセスするための関数オブジェクトの型 |
| [in] | beginX | X座標の開始位置 |
| [in] | beginY | Y座標の開始位置 |
| [in] | endX | X座標の終了位置 |
| [in] | endY | Y座標の終了位置 |
| [in] | body | 要素にアクセスするための関数オブジェクト |
|
inlinenodiscardnoexcept |
要素の取得
| [in] | pair | IndexType型のXとYのペア |
|
inlinenodiscardconstexprnoexcept |
要素の取得
| [in] | x | 取得する要素のX座標 |
| [in] | y | 取得する要素のY座標 |
|
inlinenodiscardconstexprnoexcept |
配列全体のサイズを取得
|
inlinenodiscardconstexprnoexcept |
配列のY方向の最大値を取得
|
inlinenodiscardconstexprnoexcept |
書き込み可能な要素へのポインタを取得
| [in] | pair | IndexType型のXとYのペア |
|
inlinenodiscardconstexprnoexcept |
書き込み可能な要素へのポインタを取得
| [in] | x | 取得する要素のX座標 |
| [in] | y | 取得する要素のY座標 |
|
inlinenodiscardconstexprnoexcept |
配列のX方向の最大値を取得
|
inlinestaticnodiscardconstexprnoexcept |
ペアの生成
| [in] | x | X座標 |
| [in] | y | Y座標 |
|
inlinenoexcept |
配列の生成
| [in] | width | 配列の幅 |
| [in] | height | 配列の高さ |
| [in] | clearMode | メモリ領域の初期化方法 |
| true | 成功 |
| false | 失敗 |
|
inlinenoexcept |
ムーブ代入
| [in] | rhs | 右辺値 |
|
inlinenodiscardnoexcept |
添字演算子による要素の取得
| [in] | pair | IndexType型のXとYのペア |
|
inlinenoexcept |
配列を同じサイズで構築し直す
| [in] | clearMode | メモリ領域の初期化方法 |
| true | 成功 |
| false | 失敗 |
|
inlineconstexprnoexcept |
無効値の設定
| [in] | value | 設定する値 |
|
inlineconstexprnoexcept |
無効値の設定
| [in] | value | 設定する値(右辺値参照) |