OROCHI
 
Loading...
Searching...
No Matches
GxArray Class Reference

配列クラス More...

#include <GxArray.h>

Inheritance diagram for GxArray:
Collaboration diagram for GxArray:

Classes

struct  Iterator
 イテレータ More...
 

Public Member Functions

初期化
 GxArray (void)
 デフォルトコンストラクタ
 
 GxArray (GxAllocatorList::ALLOCATOR_TYPE allocatorType)
 コンストラクタ
 
 ~GxArray (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBase
constexpr GxClassBase (void)
 コンストラクタ
 
constexpr GxClassBase (const GxClassBase &base)
 コピーコンストラクタ
 
 ~GxClassBase (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 

Protected Attributes

メンバ変数
void ** _ppObject
 配列データ
 
u32 _count
 配列数
 
u32 _allocCount
 確保した配列数
 
GxAllocatorList::ALLOCATOR_TYPE _allocatorType
 アロケータ種別
 

定義

using __type = void*
 
static constexpr u32 ALLOC_COUNT_FIRST = 8
 初期の確保領域
 

操作

GX_FORCE_INLINE void addTop (void *pObject)
 先頭に追加
 
void addBottom (void *pObject)
 末尾に追加
 
void insert (u32 index, void *pObject)
 挿入
 
void erase (void *pObject)
 解放(nullptrにするだけ)
 
virtual void erase (u32 index)
 解放(nullptrにするだけ)
 
void eraseAll (void)
 全削除
 
void remove (void *pObject)
 削除(領域を詰める)
 
void removeFirst (void *pObject)
 削除(領域を詰める、見つかったら終了)
 
void remove (u32 index)
 削除(領域を詰める)
 
GX_FORCE_INLINE void removeAll (void)
 全削除
 
void * pop (void)
 スタックとして末尾から取り出しと削除
 
s32 findIndex (void *pObject, u32 startIndex=0) const
 オブジェクトのインデックスを返す
 
virtual void ** allocateMemory (u32 size)
 メモリ確保関数
 
virtual u32 expandAllocCount (void)
 

アクセサ

constexpr __type & operator[] (u32 i) const
 const配列
 
constexpr __type & operator[] (u32 i)
 配列
 
constexpr Iterator< __type > begin (void) const
 先頭を取得
 
constexpr Iterator< __type > end (void) const
 終端を取得
 
constexpr void * getObject (u32 index) const
 オブジェクトの取得
 
virtual void setObject (u32 index, void *pObject)
 オブジェクトの設定
 
constexpr u32 getCount (void) const
 配列数を取得
 
void setCount (u32 count)
 配列数を設定
 
void setAllocCount (u32 count)
 
s32 indexOf (void *pObject) const
 インデックスを取得
 

Additional Inherited Members

- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 

Detailed Description

配列クラス

Constructor & Destructor Documentation

◆ GxArray()

GxArray::GxArray ( GxAllocatorList::ALLOCATOR_TYPE allocatorType)

コンストラクタ

Parameters
allocatorType[in] 使用アロケータ

Member Function Documentation

◆ addBottom()

void GxArray::addBottom ( void * pObject)

末尾に追加

Parameters
pObject[in] 追加オブジェクト
Here is the call graph for this function:
Here is the caller graph for this function:

◆ erase() [1/2]

void GxArray::erase ( u32 index)
virtual

解放(nullptrにするだけ)

Parameters
index[in] 削除位置

◆ erase() [2/2]

void GxArray::erase ( void * pObject)

解放(nullptrにするだけ)

Parameters
pObject[in] 削除オブジェクト
Here is the call graph for this function:
Here is the caller graph for this function:

◆ expandAllocCount()

virtual u32 GxArray::expandAllocCount ( void )
inlineprotectedvirtual

リスト伸長アルゴリズムを定義

Note
必ず現在の _allocCount より大きくなるように実装してください。

◆ findIndex()

s32 GxArray::findIndex ( void * pObject,
u32 startIndex = 0 ) const

オブジェクトのインデックスを返す

オブジェクトのインデックスを探す

Parameters
[in]pObjectオブジェクト
[in]startIndex探索開始インデックス
Returns
インデックス(みつからない場合は-1)
Here is the caller graph for this function:

◆ indexOf()

s32 GxArray::indexOf ( void * pObject) const

インデックスを取得

Parameters
pObject[in] 対象オブジェクト
Returns
先頭のインデックス(見つからない場合は-1)
Here is the caller graph for this function:

◆ insert()

void GxArray::insert ( u32 index,
void * pObject )

挿入

Parameters
index[in] 追加位置
pObject[in] 追加オブジェクト
Here is the call graph for this function:

◆ pop()

void * GxArray::pop ( void )

スタックとして末尾から取り出しと削除

Returns
取り出したオブジェクト

◆ remove() [1/2]

void GxArray::remove ( u32 index)

削除(領域を詰める)

Parameters
index[in] 削除位置

◆ remove() [2/2]

void GxArray::remove ( void * pObject)

削除(領域を詰める)

Parameters
pObject[in] 削除オブジェクト
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeFirst()

void GxArray::removeFirst ( void * pObject)

削除(領域を詰める、見つかったら終了)

Parameters
pObject[in] 削除オブジェクト
Here is the call graph for this function:

◆ setAllocCount()

void GxArray::setAllocCount ( u32 count)

メモリ確保数を設定

Note
新たに伸長された領域は 0 でクリアされる。
_allocCount > (引数count) の状態を指定した場合は getCount()
(引数)count に詰められる。
Parameters
count[in] メモリ確保数
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCount()

void GxArray::setCount ( u32 count)

配列数を設定

Parameters
count[in] 配列数
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setObject()

void GxArray::setObject ( u32 index,
void * pObject )
virtual

オブジェクトの設定

Parameters
index[in] 設定位置
pObject[in] 設定オブジェクト
Here is the caller graph for this function:

The documentation for this class was generated from the following files: