ArrayImpl< ARRAY > Class Template Reference

#include <collection.h>

Inheritance diagram for ArrayImpl< ARRAY >:

Public Types

using ArrayType = typename std::decay< ARRAY >::type
 
using ValueType = typename ConstIf< typename ArrayType::ValueType, CONSTARRAY >::type
 
using NonConstValueType = typename std::remove_const< ValueType >::type
 
using Super = typename std::conditional< CONSTARRAY||!REFERENCE, ArrayInterface< ValueType >, NonConstArray< ValueType > >::type
 
using Interface = typename Super::Interface
 

Public Member Functions

 MAXON_IMPLEMENTATION_SIMPLE (ArrayImpl, typename)
 
 ArrayImpl ()
 
 ArrayImpl (ARRAY &&array)
 
 ArrayImpl (ArrayImpl &&src)
 
Result< void > PrivateInsert (Int index, const StridedBlock< const ValueType > &values, Bool move)
 
ResultRef< ValueTypeInsert (Int index)
 
ResultMem Insert (Int index, const Block< const ValueType > &values)
 
ResultMem Insert (Int index, const MoveBlock< ValueType > &values)
 
ResultRef< ValueTypeAppend ()
 
ResultRef< ValueTypeAppend (const ValueType &data)
 
ResultRef< ValueTypeAppend (NonConstValueType &&data)
 
ResultMem Erase (Int index, Int count)
 
ResultMem SwapErase (Int index, Int count)
 
Int GetCount () const
 
const ValueTypeoperator[] (Int index) const
 
ResultRef< ValueTypeGetWritable (Int index)
 
Int GetBlock (Int index, SimdBlock< const ValueType > &block) const
 
Result< IntGetWritableBlock (Int index, SimdBlock< ValueType > &block)
 
Int GetBlock (Int index, Block< const ValueType, false > &block) const
 
ResultMem Resize (Int count, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::DEFAULT)
 
ResultMem SetCapacityHint (Int requestedCapacity, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY)
 
Result< void > CopyFrom (const VArrayInterface< ValueType > &other)
 
Result< Interface * > MakeWritable (Bool cloneElements) const
 
String ToString (const FormatStatement *formatStatement) const
 
Int GetMemorySize () const
 
const DataTypeGetValueDataType () const
 
void Reset ()
 
void Flush ()
 
Bool IsEqual (const StaticArrayInterface< ValueType > *other, EQUALITY equality) const
 
UInt GetHashCode () const
 
std::add_lvalue_reference< ARRAY >::type GetArray ()
 
const ArrayTypeGetArray () const
 

Static Public Attributes

static const Bool CONSTARRAY
 
static const Bool REFERENCE
 

Private Member Functions

 MAXON_DISALLOW_COPY_AND_ASSIGN (ArrayImpl)
 

Private Attributes

ARRAY _array
 

Member Typedef Documentation

◆ ArrayType

using ArrayType = typename std::decay<ARRAY>::type

◆ ValueType

using ValueType = typename ConstIf<typename ArrayType::ValueType, CONSTARRAY>::type

◆ NonConstValueType

using NonConstValueType = typename std::remove_const<ValueType>::type

◆ Super

using Super = typename std::conditional<CONSTARRAY || !REFERENCE, ArrayInterface<ValueType>, NonConstArray<ValueType> >::type

◆ Interface

using Interface = typename Super::Interface

Constructor & Destructor Documentation

◆ ArrayImpl() [1/3]

ArrayImpl ( )

◆ ArrayImpl() [2/3]

ArrayImpl ( ARRAY &&  array)
explicit

◆ ArrayImpl() [3/3]

ArrayImpl ( ArrayImpl< ARRAY > &&  src)

Member Function Documentation

◆ MAXON_IMPLEMENTATION_SIMPLE()

MAXON_IMPLEMENTATION_SIMPLE ( ArrayImpl< ARRAY >  ,
typename   
)

◆ PrivateInsert()

Result<void> PrivateInsert ( Int  index,
const StridedBlock< const ValueType > &  values,
Bool  move 
)

◆ Insert() [1/3]

ResultRef<ValueType> Insert ( Int  index)

◆ Insert() [2/3]

ResultMem Insert ( Int  index,
const Block< const ValueType > &  values 
)

◆ Insert() [3/3]

ResultMem Insert ( Int  index,
const MoveBlock< ValueType > &  values 
)

◆ Append() [1/3]

ResultRef<ValueType> Append ( )

◆ Append() [2/3]

ResultRef<ValueType> Append ( const ValueType data)

◆ Append() [3/3]

ResultRef<ValueType> Append ( NonConstValueType &&  data)

◆ Erase()

ResultMem Erase ( Int  index,
Int  count 
)

◆ SwapErase()

ResultMem SwapErase ( Int  index,
Int  count 
)

◆ GetCount()

Int GetCount ( ) const

◆ operator[]()

const ValueType& operator[] ( Int  index) const

◆ GetWritable()

ResultRef<ValueType> GetWritable ( Int  index)

◆ GetBlock() [1/2]

Int GetBlock ( Int  index,
SimdBlock< const ValueType > &  block 
) const

◆ GetWritableBlock()

Result<Int> GetWritableBlock ( Int  index,
SimdBlock< ValueType > &  block 
)

◆ GetBlock() [2/2]

Int GetBlock ( Int  index,
Block< const ValueType, false > &  block 
) const

◆ Resize()

◆ SetCapacityHint()

ResultMem SetCapacityHint ( Int  requestedCapacity,
COLLECTION_RESIZE_FLAGS  resizeFlags = COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY 
)

◆ CopyFrom()

Result<void> CopyFrom ( const VArrayInterface< ValueType > &  other)

◆ MakeWritable()

Result<Interface*> MakeWritable ( Bool  cloneElements) const

◆ ToString()

String ToString ( const FormatStatement formatStatement) const

◆ GetMemorySize()

Int GetMemorySize ( ) const

◆ GetValueDataType()

const DataType& GetValueDataType ( ) const

◆ Reset()

void Reset ( )

◆ Flush()

void Flush ( )

◆ IsEqual()

Bool IsEqual ( const StaticArrayInterface< ValueType > *  other,
EQUALITY  equality 
) const

◆ GetHashCode()

UInt GetHashCode ( ) const

◆ GetArray() [1/2]

std::add_lvalue_reference<ARRAY>::type GetArray ( )

◆ GetArray() [2/2]

const ArrayType& GetArray ( ) const

◆ MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( ArrayImpl< ARRAY >  )
private

Member Data Documentation

◆ CONSTARRAY

const Bool CONSTARRAY
static

◆ REFERENCE

const Bool REFERENCE
static

◆ _array

ARRAY _array
private