ArrayImpl< ARRAY > Class Template Reference Data Structures

#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  接口 = typename Super::Interface

公共成员函数

  MAXON_IMPLEMENTATION_SIMPLE ( ArrayImpl , typename)
  ArrayImpl ()
  ArrayImpl (ARRAY &&array)
  ArrayImpl ( ArrayImpl && src )
const ContainerDataType GetContainerType () const
GenericContainerInterface::INTERFACES   GetInterfaces () const
Int   FindMemberIndex (const InternedId &name) const
Int   GetIteratorStateSize (const MemberMap *map) const
Result < Int InitIterator ( ViewIteratorMember *members, const MemberMap *map, Char *state, PersistentIdBuffer *idBuffer) const
Result < Int ValidateIterator ( Int index, ViewIteratorMember *members, const MemberMap *map, Char *state, PersistentIdBuffer *idBuffer) const
void  FreeIterator ( ViewIteratorMember *members, const MemberMap *map, Char *state, PersistentIdBuffer *idBuffer) const
Result < Int MoveIterator ( Int index, ViewIteratorMember *members, const MemberMap *map, Char *state, PersistentIdBuffer *idBuffer) const
Result < void >  AdvancePersistentId ( Int index, const Char *state, PersistentIdBuffer &idBuffer) const
Result < void >  PrivateInsert ( Int index, const StridedBlock < const ValueType > &values, Bool move)
const PersistentIdGenerator &  GetPersistentIdGenerator () const
void  SetPersistentIdGenerator (const PersistentIdGenerator &generator)
ResultRef < ValueType Insert ( Int index)
ResultMem   Insert ( Int index, const Block < const ValueType > &values)
ResultMem   Insert ( Int index, const MoveBlock < ValueType > &values)
ResultRef < ValueType Append ()
ResultRef < ValueType Append (const ValueType &data)
ResultRef < ValueType Append ( NonConstValueType &&data)
ResultMem   Erase ( Int index, Int count)
ResultMem   SwapErase ( Int index, Int count)
Int   GetCount () const
const ValueType operator[] ( Int index) const
ResultRef < ValueType GetWritable ( Int index)
Int   GetBlock ( Int index, SimdBlock < const ValueType > &block) const
Result < Int GetBlock ( Int index, SimdBlock < NonConstValueType > &block)
Int   GetBlock ( Int index, Block < const ValueType > &block) const
Int   GetBlock ( Int index, Block < NonConstValueType > &block)
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 ArrayInterface < ValueType > &other)
Result < GenericContainerInterface * >  MakeWritable ( Bool cloneElements) const
Result < GenericContainerInterface * >  Clone ( Bool cloneElements) const
String   ToString (const FormatStatement *formatStatement=nullptr) const
Int   GetMemorySize () const
const DataType GetValueDataType () const
void  重置 ()
void  Flush ()
Bool   IsEqual (const GenericContainerInterface *o, EQUALITY equality) const
HashInt   GetHashCode () const
HashValue   GetHashValue () const
std::add_lvalue_reference< ARRAY >::type  GetArray ()
const ArrayType GetArray () const

静态公共属性

static const Bool   CONSTARRAY
static const Bool   REFERENCE

私有成员函数

  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

◆  接口

using 接口 = typename Super::Interface

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

◆  ArrayImpl() [1/3]

ArrayImpl ( )

◆  ArrayImpl() [2/3]

ArrayImpl ( ARRAY &&  array )
explicit

◆  ArrayImpl() [3/3]

ArrayImpl ( ArrayImpl < ARRAY > &&  src )

成员函数文档编制

◆  MAXON_IMPLEMENTATION_SIMPLE()

MAXON_IMPLEMENTATION_SIMPLE ( ArrayImpl < ARRAY >  ,
typename   
)

◆  GetContainerType()

const ContainerDataType & GetContainerType ( ) const

◆  GetInterfaces()

GenericContainerInterface::INTERFACES GetInterfaces ( ) const

◆  FindMemberIndex()

Int FindMemberIndex ( const InternedId name ) const

◆  GetIteratorStateSize()

Int GetIteratorStateSize ( const MemberMap map ) const

◆  InitIterator()

Result < Int > InitIterator ( ViewIteratorMember members ,
const MemberMap map ,
Char state ,
PersistentIdBuffer idBuffer  
) const

◆  ValidateIterator()

Result < Int > ValidateIterator ( Int   index ,
ViewIteratorMember members ,
const MemberMap map ,
Char state ,
PersistentIdBuffer idBuffer  
) const

◆  FreeIterator()

void FreeIterator ( ViewIteratorMember members ,
const MemberMap map ,
Char state ,
PersistentIdBuffer idBuffer  
) const

◆  MoveIterator()

Result < Int > MoveIterator ( Int   index ,
ViewIteratorMember members ,
const MemberMap map ,
Char state ,
PersistentIdBuffer idBuffer  
) const

◆  AdvancePersistentId()

Result <void> AdvancePersistentId ( Int   index ,
const Char state ,
PersistentIdBuffer idBuffer  
) const

◆  PrivateInsert()

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

◆  GetPersistentIdGenerator()

const PersistentIdGenerator& GetPersistentIdGenerator ( ) const

◆  SetPersistentIdGenerator()

void SetPersistentIdGenerator ( const PersistentIdGenerator &  generator )

◆  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/4]

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

◆  GetBlock() [2/4]

Result < Int > GetBlock ( Int   index ,
SimdBlock < NonConstValueType > &  block  
)

◆  GetBlock() [3/4]

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

◆  GetBlock() [4/4]

Int GetBlock ( Int   index ,
Block < NonConstValueType > &  block  
)

◆  Resize()

ResultMem Resize ( Int   count ,
COLLECTION_RESIZE_FLAGS   resizeFlags = COLLECTION_RESIZE_FLAGS::DEFAULT  
)

◆  SetCapacityHint()

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

◆  CopyFrom()

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

◆  MakeWritable()

Result < GenericContainerInterface *> MakeWritable ( Bool   cloneElements ) const

◆  Clone()

Result < GenericContainerInterface *> Clone ( Bool   cloneElements ) const

◆  ToString()

String ToString ( const FormatStatement formatStatement = nullptr ) const

◆  GetMemorySize()

Int GetMemorySize ( ) const

◆  GetValueDataType()

const DataType & GetValueDataType ( ) const

◆  Reset()

void Reset ( )

◆  Flush()

void Flush ( )

◆  IsEqual()

Bool IsEqual ( const GenericContainerInterface o ,
EQUALITY   equality  
) const

◆  GetHashCode()

HashInt GetHashCode ( ) const

◆  GetHashValue()

HashValue GetHashValue ( ) 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