BlockArray< T, BLOCK_SIZE_EXPONENT, MEMFLAGS, ALLOCATOR >::ArrayOfBlocks Class Reference

公共成员函数

  ArrayOfBlocks ()
  ArrayOfBlocks (const ForwardAllocator &a)
  ArrayOfBlocks ( ForwardAllocator &&a)
  ArrayOfBlocks ( ArrayOfBlocks && src )
void  重置 ()
void  Flush ()
Int   GetCount () const
Bool   IsEmpty () const
Bool   IsPopulated () const
Bool   IsContinuous () const
void  MarkAsNoncontinuous ()
ArrayBlock operator[] ( Int index)
const ArrayBlock operator[] ( Int index) const
Super::Iterator   Begin ()
Super::ConstIterator   Begin () const
ArrayBlock GetLast ()
Super   Disconnect ()
const ArrayBlock GetLast () const
ArrayBlock Append ()
ArrayBlock Insert ( Int position)
ArrayBlock Erase ( Int position)
ArrayBlock Pop ()
Int   GetIndex (const ArrayBlock &x) const
ArrayBlock SplitBlock ( Int blockIdx, Int localIdx)
void  UpdateSubmittedElementCount (const ArrayBlock *block, Int cnt)
Int   GetSubmittedElementCount () const
Int   GetMemorySize () const

Private Types

using  Super = BaseArray < ArrayBlock , BASEARRAY_DEFAULT_CHUNK_SIZE , BASEARRAYFLAGS::NONE , ForwardAllocator >

私有成员函数

ArrayBlock InsertOnly ( Int position)

Private Attributes

Super   _array
Int   _usedBlockCnt
Int   _submittedElementCnt
Int   _isContinuous
Int   _reserved

Member Typedef Documentation

◆  Super

using Super = BaseArray < ArrayBlock , BASEARRAY_DEFAULT_CHUNK_SIZE , BASEARRAYFLAGS::NONE , ForwardAllocator >
private

构造函数 & 析构函数文档编制

◆  ArrayOfBlocks() [1/4]

ArrayOfBlocks ( )

◆  ArrayOfBlocks() [2/4]

ArrayOfBlocks ( const ForwardAllocator a )
explicit

◆  ArrayOfBlocks() [3/4]

ArrayOfBlocks ( ForwardAllocator &&  a )
explicit

◆  ArrayOfBlocks() [4/4]

ArrayOfBlocks ( ArrayOfBlocks &&  src )

成员函数文档编制

◆  Reset()

void Reset ( )

◆  Flush()

void Flush ( )

◆  GetCount()

Int GetCount ( ) const

◆  IsEmpty()

Bool IsEmpty ( ) const

◆  IsPopulated()

Bool IsPopulated ( ) const

◆  IsContinuous()

Bool IsContinuous ( ) const

◆  MarkAsNoncontinuous()

void MarkAsNoncontinuous ( )

◆  operator[]() [1/2]

ArrayBlock & operator[] ( Int   index )

◆  operator[]() [2/2]

const ArrayBlock & operator[] ( Int   index ) const

◆  Begin() [1/2]

Super::Iterator Begin ( )

◆  Begin() [2/2]

Super::ConstIterator Begin ( ) const

◆  GetLast() [1/2]

ArrayBlock * GetLast ( )
返回
Pointer to the last ArrayBlock (undefined if the array is empty).

◆  Disconnect()

Super Disconnect ( )

◆  GetLast() [2/2]

const ArrayBlock * GetLast ( ) const
返回
Pointer to the last ArrayBlock (undefined if the array is empty).

◆  Append()

ArrayBlock * Append ( )

◆  Insert()

ArrayBlock * Insert ( Int   position )

◆  Erase()

ArrayBlock * Erase ( Int   position )

◆  Pop()

ArrayBlock * Pop ( )

◆  GetIndex()

Int GetIndex ( const ArrayBlock x ) const

◆  SplitBlock()

ArrayBlock * SplitBlock ( Int   blockIdx ,
Int   localIdx  
)

◆  UpdateSubmittedElementCount()

void UpdateSubmittedElementCount ( const ArrayBlock block ,
Int   cnt  
)

◆  GetSubmittedElementCount()

Int GetSubmittedElementCount ( ) const

◆  GetMemorySize()

Int GetMemorySize ( ) const

Calculates the memory usage for this array. The array element class must have a public member GetMemorySize that returns an element's size.

返回
Memory size in bytes.

◆  InsertOnly()

ArrayBlock * InsertOnly ( Int   position )
private

Member Data Documentation

◆  _array

Super _array
private

◆  _usedBlockCnt

Int _usedBlockCnt
private

◆  _submittedElementCnt

Int _submittedElementCnt
private

◆  _isContinuous

Int _isContinuous
private

◆  _reserved

Int _reserved
private