Open Search
    ArrayImpl< ARRAY > Class Template Reference

    #include <array.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)
     
     ArrayImpl ()
     
     ArrayImpl (ARRAY &&array)
     
     ArrayImpl (ArrayImpl &&src)
     
    const ContainerDataTypeGetContainerType () const
     
    GenericContainerInterface::INTERFACES GetInterfaces () const
     
    Int FindMemberIndex (const InternedId &name) const
     
    Int GetIteratorStateSize (const MemberMap *map) const
     
    Result< IntInitIterator (ViewIteratorMember *members, const MemberMap *map, Char *state, PersistentIdBuffer *idBuffer, Bool constAccess) const
     
    Result< IntValidateIterator (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< IntMoveIterator (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, COLLECTION_RESIZE_FLAGS resizeFlags)
     
    const PersistentIdGenerator & GetPersistentIdGenerator () const
     
    void SetPersistentIdGenerator (const PersistentIdGenerator &generator)
     
    Result< void > MakeElementsWritable (Int start, Int end, Bool copyElements)
     
    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< IntGetBlock (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 copyContent) const
     
    String ToString (const FormatStatement *formatStatement=nullptr) const
     
    Int GetMemorySize () const
     
    const DataTypeGetValueDataType () const
     
    void Reset ()
     
    void Flush ()
     
    Bool IsEqual (const GenericContainerInterface *o, EQUALITY equality) const
     
    HashInt GetHashCode () const
     
    UniqueHash GetUniqueHashCode () 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 >  )

    ◆ 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,
    Bool  constAccess 
    ) 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,
    COLLECTION_RESIZE_FLAGS  resizeFlags 
    )

    ◆ GetPersistentIdGenerator()

    const PersistentIdGenerator& GetPersistentIdGenerator ( ) const

    ◆ SetPersistentIdGenerator()

    void SetPersistentIdGenerator ( const PersistentIdGenerator &  generator)

    ◆ MakeElementsWritable()

    Result<void> MakeElementsWritable ( Int  start,
    Int  end,
    Bool  copyElements 
    )

    ◆ 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()

    ◆ 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  copyContent) 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

    ◆ GetUniqueHashCode()

    UniqueHash GetUniqueHashCode ( ) 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