OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    NCollection_DynamicArray< TheItemType > Class Template Reference

    Class NCollection_DynamicArray (dynamic array of objects). More...

    #include <NCollection_DynamicArray.hxx>

    Inheritance diagram for NCollection_DynamicArray< TheItemType >:

    Data Structures

    class  DynamicIterator

    Public Types

    typedef NCollection_OccAllocator< TheItemType > allocator_type
     Memory allocation.
    typedef NCollection_LinearVector< TheItemType * > vector
    using value_type = TheItemType
    using size_type = size_t
    using difference_type = size_t
    using pointer = TheItemType*
    using const_pointer = const TheItemType*
    using reference = TheItemType&
    using const_reference = const TheItemType&
    using iterator = DynamicIterator<false>
    using const_iterator = DynamicIterator<true>
    using Iterator = NCollection_Iterator<NCollection_DynamicArray<TheItemType>>

    Public Member Functions

    const_iterator begin () const noexcept
    iterator begin () noexcept
    const_iterator cbegin () const noexcept
    iterator end () noexcept
    const_iterator end () const noexcept
    const_iterator cend () const noexcept

    public methods

    friend iterator
     log2(myInternalSize) for fast index-to-block mapping
    friend const_iterator
     log2(myInternalSize) for fast index-to-block mapping
    vector myContainer
     log2(myInternalSize) for fast index-to-block mapping
    allocator_type myAlloc
     log2(myInternalSize) for fast index-to-block mapping
    size_t myInternalSize
     log2(myInternalSize) for fast index-to-block mapping
    size_t myBlockShift
     log2(myInternalSize) for fast index-to-block mapping
    size_t myBlockMask
     myInternalSize - 1 for fast index-within-block mapping
    size_t myUsedSize
     log2(myInternalSize) for fast index-to-block mapping
     NCollection_DynamicArray (const size_t theIncrement)
     log2(myInternalSize) for fast index-to-block mapping
     NCollection_DynamicArray (const int theIncrement=256)
     log2(myInternalSize) for fast index-to-block mapping
     NCollection_DynamicArray (const size_t theIncrement, const occ::handle< NCollection_BaseAllocator > &theAllocator)
     log2(myInternalSize) for fast index-to-block mapping
     NCollection_DynamicArray (const int theIncrement, const occ::handle< NCollection_BaseAllocator > &theAllocator)
     log2(myInternalSize) for fast index-to-block mapping
     NCollection_DynamicArray (const size_t theIncrement, const allocator_type &theAllocator)
     log2(myInternalSize) for fast index-to-block mapping
     NCollection_DynamicArray (const int theIncrement, const allocator_type &theAllocator)
     log2(myInternalSize) for fast index-to-block mapping
     NCollection_DynamicArray (const NCollection_DynamicArray &theOther)
     Copy constructor.
     NCollection_DynamicArray (NCollection_DynamicArray &&theOther) noexcept
     log2(myInternalSize) for fast index-to-block mapping
     ~NCollection_DynamicArray ()
     log2(myInternalSize) for fast index-to-block mapping
    size_t Size () const noexcept
     Total number of items in the vector.
    int Length () const noexcept
     Total number of items (legacy int-returning API).
    int Lower () const noexcept
     Method for consistency with other collections.
    int Upper () const noexcept
     Method for consistency with other collections.
    bool IsEmpty () const noexcept
     Empty query.
    NCollection_DynamicArrayAssign (const NCollection_DynamicArray &theOther, const bool theOwnAllocator=true)
     Assignment to the collection of the same type.
    NCollection_DynamicArrayAssign (NCollection_DynamicArray &&theOther)
     log2(myInternalSize) for fast index-to-block mapping
    NCollection_DynamicArrayoperator= (const NCollection_DynamicArray &theOther)
     Assignment operator.
    NCollection_DynamicArrayoperator= (NCollection_DynamicArray &&theOther) noexcept
     Assignment operator.
    reference Append (const TheItemType &theValue)
     Append.
    reference Append (TheItemType &&theValue)
     Append.
    reference InsertAfter (const size_t theIndex, const TheItemType &theValue)
     Insert a value after the element at theIndex, shifting subsequent elements right.
    reference InsertAfter (const size_t theIndex, TheItemType &&theValue)
     Insert a value after the element at theIndex (move version).
    reference InsertAfter (const int theIndex, const TheItemType &theValue)
     log2(myInternalSize) for fast index-to-block mapping
    reference InsertAfter (const int theIndex, TheItemType &&theValue)
     log2(myInternalSize) for fast index-to-block mapping
    reference InsertBefore (const size_t theIndex, const TheItemType &theValue)
     Insert a value before the element at theIndex, shifting it and subsequent elements right.
    reference InsertBefore (const size_t theIndex, TheItemType &&theValue)
     Insert a value before the element at theIndex (move version).
    reference InsertBefore (const int theIndex, const TheItemType &theValue)
     log2(myInternalSize) for fast index-to-block mapping
    reference InsertBefore (const int theIndex, TheItemType &&theValue)
     log2(myInternalSize) for fast index-to-block mapping
    void EraseLast ()
     log2(myInternalSize) for fast index-to-block mapping
    reference Appended ()
     Appends an empty value and returns the reference to it.
    template<typename... Args>
    reference EmplaceAppend (Args &&... theArgs)
     Emplace one item at the end, constructing it in-place.
    template<typename... Args>
    reference EmplaceValue (const size_t theIndex, Args &&... theArgs)
     Emplace value at the specified index, constructing it in-place If the index is beyond current size, default-constructs intermediate elements.
    template<typename... Args>
    reference EmplaceValue (const int theIndex, Args &&... theArgs)
     log2(myInternalSize) for fast index-to-block mapping
    const_reference operator() (const size_t theIndex) const noexcept
     Operator() - query the const value.
    const_reference operator() (const int theIndex) const noexcept
     log2(myInternalSize) for fast index-to-block mapping
    const_reference operator[] (const size_t theIndex) const noexcept
     Operator[] - query the const value.
    const_reference operator[] (const int theIndex) const noexcept
     log2(myInternalSize) for fast index-to-block mapping
    const_reference Value (const size_t theIndex) const noexcept
     log2(myInternalSize) for fast index-to-block mapping
    const_reference Value (const int theIndex) const noexcept
     log2(myInternalSize) for fast index-to-block mapping
    const_reference First () const noexcept
    reference ChangeFirst () noexcept
    const_reference Last () const noexcept
    reference ChangeLast () noexcept
    reference operator() (const size_t theIndex) noexcept
     Operator() - query the value.
    reference operator() (const int theIndex) noexcept
     log2(myInternalSize) for fast index-to-block mapping
    reference operator[] (const size_t theIndex) noexcept
     Operator[] - query the value.
    reference operator[] (const int theIndex) noexcept
     log2(myInternalSize) for fast index-to-block mapping
    reference ChangeValue (const size_t theIndex) noexcept
     log2(myInternalSize) for fast index-to-block mapping
    reference ChangeValue (const int theIndex) noexcept
     log2(myInternalSize) for fast index-to-block mapping
    reference SetValue (const size_t theIndex, const TheItemType &theValue)
     SetValue () - set or append a value.
    reference SetValue (const size_t theIndex, TheItemType &&theValue)
     SetValue () - set or append a value.
    reference SetValue (const int theIndex, const TheItemType &theValue)
     log2(myInternalSize) for fast index-to-block mapping
    reference SetValue (const int theIndex, TheItemType &&theValue)
     log2(myInternalSize) for fast index-to-block mapping
    void Clear (const bool theReleaseMemory=false)
     log2(myInternalSize) for fast index-to-block mapping
    void SetIncrement (const size_t theIncrement) noexcept
     log2(myInternalSize) for fast index-to-block mapping
    void SetIncrement (const int theIncrement) noexcept
     log2(myInternalSize) for fast index-to-block mapping
    size_t availableSize () const noexcept
     log2(myInternalSize) for fast index-to-block mapping
    void ensureStorageForIndex (const size_t theIndex)
     Ensure storage blocks exist to access theIndex.
    void ensureBlockCount (const size_t theBlockCount)
     Ensure at least theBlockCount blocks are allocated in myContainer.
    TheItemType * expandArray ()
     log2(myInternalSize) for fast index-to-block mapping
    reference at (const size_t theInd) noexcept
     log2(myInternalSize) for fast index-to-block mapping
    const_reference at (const size_t theInd) const noexcept
     log2(myInternalSize) for fast index-to-block mapping
    void copyDate ()
     log2(myInternalSize) for fast index-to-block mapping
    TheItemType ** getArray () noexcept
     Wrapper to extract array of block pointers.
    TheItemType *const * getArray () const noexcept
     Wrapper to extract array of block pointers (const overload).
    static constexpr size_t roundUpPow2 (const size_t theValue) noexcept
     Round up to the nearest power of 2 (returns theValue if already power of 2). Works correctly for both 32-bit and 64-bit size_t.
    static constexpr size_t log2Pow2 (const size_t theValue) noexcept
     Compute log2 of a power-of-2 value.

    Detailed Description

    template<class TheItemType>
    class NCollection_DynamicArray< TheItemType >

    Class NCollection_DynamicArray (dynamic array of objects).

    The array's indices always start at 0.

    The Vector is always created with 0 length. It can be enlarged by two means:

    1. Calling the method Append (val) - then "val" is added to the end of the vector (the vector length is incremented)
    2. Calling the method SetValue (i, val) - if "i" is greater than or equal to the current length of the vector, the vector is enlarged to accomo- date this index

    The methods Append and SetValue return a non-const reference to the copied object inside the vector. This reference is guaranteed to be valid until the vector is destroyed. It can be used to access the vector member directly or to pass its address to other data structures.

    The vector iterator remembers the length of the vector at the moment of the creation or initialisation of the iterator. Therefore the iteration begins at index 0 and stops at the index equal to (remembered_length-1). It is OK to enlarge the vector during the iteration.

    Member Typedef Documentation

    ◆ allocator_type

    template<class TheItemType>
    typedef NCollection_OccAllocator<TheItemType> NCollection_DynamicArray< TheItemType >::allocator_type

    Memory allocation.

    ◆ const_iterator

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::const_iterator = DynamicIterator<true>

    ◆ const_pointer

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::const_pointer = const TheItemType*

    ◆ const_reference

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::const_reference = const TheItemType&

    ◆ difference_type

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::difference_type = size_t

    ◆ Iterator

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::Iterator = NCollection_Iterator<NCollection_DynamicArray<TheItemType>>

    ◆ iterator

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::iterator = DynamicIterator<false>

    ◆ pointer

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::pointer = TheItemType*

    ◆ reference

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::reference = TheItemType&

    ◆ size_type

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::size_type = size_t

    ◆ value_type

    template<class TheItemType>
    using NCollection_DynamicArray< TheItemType >::value_type = TheItemType

    ◆ vector

    template<class TheItemType>
    typedef NCollection_LinearVector<TheItemType*> NCollection_DynamicArray< TheItemType >::vector

    Constructor & Destructor Documentation

    ◆ NCollection_DynamicArray() [1/8]

    template<class TheItemType>
    NCollection_DynamicArray< TheItemType >::NCollection_DynamicArray ( const size_t theIncrement)
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ NCollection_DynamicArray() [2/8]

    template<class TheItemType>
    NCollection_DynamicArray< TheItemType >::NCollection_DynamicArray ( const int theIncrement = 256)
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ NCollection_DynamicArray() [3/8]

    template<class TheItemType>
    NCollection_DynamicArray< TheItemType >::NCollection_DynamicArray ( const size_t theIncrement,
    const occ::handle< NCollection_BaseAllocator > & theAllocator )
    inlineexplicit

    log2(myInternalSize) for fast index-to-block mapping

    ◆ NCollection_DynamicArray() [4/8]

    template<class TheItemType>
    NCollection_DynamicArray< TheItemType >::NCollection_DynamicArray ( const int theIncrement,
    const occ::handle< NCollection_BaseAllocator > & theAllocator )
    inlineexplicit

    log2(myInternalSize) for fast index-to-block mapping

    ◆ NCollection_DynamicArray() [5/8]

    template<class TheItemType>
    NCollection_DynamicArray< TheItemType >::NCollection_DynamicArray ( const size_t theIncrement,
    const allocator_type & theAllocator )
    inlineexplicit

    log2(myInternalSize) for fast index-to-block mapping

    ◆ NCollection_DynamicArray() [6/8]

    template<class TheItemType>
    NCollection_DynamicArray< TheItemType >::NCollection_DynamicArray ( const int theIncrement,
    const allocator_type & theAllocator )
    inlineexplicit

    log2(myInternalSize) for fast index-to-block mapping

    ◆ NCollection_DynamicArray() [7/8]

    template<class TheItemType>
    NCollection_DynamicArray< TheItemType >::NCollection_DynamicArray ( const NCollection_DynamicArray< TheItemType > & theOther)
    inline

    Copy constructor.

    ◆ NCollection_DynamicArray() [8/8]

    template<class TheItemType>
    NCollection_DynamicArray< TheItemType >::NCollection_DynamicArray ( NCollection_DynamicArray< TheItemType > && theOther)
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ ~NCollection_DynamicArray()

    template<class TheItemType>
    NCollection_DynamicArray< TheItemType >::~NCollection_DynamicArray ( )
    inline

    log2(myInternalSize) for fast index-to-block mapping

    Member Function Documentation

    ◆ Append() [1/2]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::Append ( const TheItemType & theValue)
    inline

    Append.

    ◆ Append() [2/2]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::Append ( TheItemType && theValue)
    inline

    Append.

    ◆ Appended()

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::Appended ( )
    inline

    Appends an empty value and returns the reference to it.

    ◆ Assign() [1/2]

    template<class TheItemType>
    NCollection_DynamicArray & NCollection_DynamicArray< TheItemType >::Assign ( const NCollection_DynamicArray< TheItemType > & theOther,
    const bool theOwnAllocator = true )
    inline

    Assignment to the collection of the same type.

    ◆ Assign() [2/2]

    template<class TheItemType>
    NCollection_DynamicArray & NCollection_DynamicArray< TheItemType >::Assign ( NCollection_DynamicArray< TheItemType > && theOther)
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ at() [1/2]

    template<class TheItemType>
    const_reference NCollection_DynamicArray< TheItemType >::at ( const size_t theInd) const
    inlineprotectednoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ at() [2/2]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::at ( const size_t theInd)
    inlineprotectednoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ availableSize()

    template<class TheItemType>
    size_t NCollection_DynamicArray< TheItemType >::availableSize ( ) const
    inlineprotectednoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ begin() [1/2]

    template<class TheItemType>
    const_iterator NCollection_DynamicArray< TheItemType >::begin ( ) const
    inlinenoexcept

    ◆ begin() [2/2]

    template<class TheItemType>
    iterator NCollection_DynamicArray< TheItemType >::begin ( )
    inlinenoexcept

    ◆ cbegin()

    template<class TheItemType>
    const_iterator NCollection_DynamicArray< TheItemType >::cbegin ( ) const
    inlinenoexcept

    ◆ cend()

    template<class TheItemType>
    const_iterator NCollection_DynamicArray< TheItemType >::cend ( ) const
    inlinenoexcept

    ◆ ChangeFirst()

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::ChangeFirst ( )
    inlinenoexcept
    Returns
    first element

    ◆ ChangeLast()

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::ChangeLast ( )
    inlinenoexcept
    Returns
    last element

    ◆ ChangeValue() [1/2]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::ChangeValue ( const int theIndex)
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ ChangeValue() [2/2]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::ChangeValue ( const size_t theIndex)
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ Clear()

    template<class TheItemType>
    void NCollection_DynamicArray< TheItemType >::Clear ( const bool theReleaseMemory = false)
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ copyDate()

    template<class TheItemType>
    void NCollection_DynamicArray< TheItemType >::copyDate ( )
    inlineprotected

    log2(myInternalSize) for fast index-to-block mapping

    ◆ EmplaceAppend()

    template<class TheItemType>
    template<typename... Args>
    reference NCollection_DynamicArray< TheItemType >::EmplaceAppend ( Args &&... theArgs)
    inline

    Emplace one item at the end, constructing it in-place.

    Parameters
    theArgsarguments forwarded to TheItemType constructor
    Returns
    reference to the newly constructed item

    ◆ EmplaceValue() [1/2]

    template<class TheItemType>
    template<typename... Args>
    reference NCollection_DynamicArray< TheItemType >::EmplaceValue ( const int theIndex,
    Args &&... theArgs )
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ EmplaceValue() [2/2]

    template<class TheItemType>
    template<typename... Args>
    reference NCollection_DynamicArray< TheItemType >::EmplaceValue ( const size_t theIndex,
    Args &&... theArgs )
    inline

    Emplace value at the specified index, constructing it in-place If the index is beyond current size, default-constructs intermediate elements.

    Parameters
    theIndexindex at which to emplace the value
    theArgsarguments forwarded to TheItemType constructor
    Returns
    reference to the newly constructed item

    ◆ end() [1/2]

    template<class TheItemType>
    const_iterator NCollection_DynamicArray< TheItemType >::end ( ) const
    inlinenoexcept

    ◆ end() [2/2]

    template<class TheItemType>
    iterator NCollection_DynamicArray< TheItemType >::end ( )
    inlinenoexcept

    ◆ ensureBlockCount()

    template<class TheItemType>
    void NCollection_DynamicArray< TheItemType >::ensureBlockCount ( const size_t theBlockCount)
    inlineprotected

    Ensure at least theBlockCount blocks are allocated in myContainer.

    ◆ ensureStorageForIndex()

    template<class TheItemType>
    void NCollection_DynamicArray< TheItemType >::ensureStorageForIndex ( const size_t theIndex)
    inlineprotected

    Ensure storage blocks exist to access theIndex.

    ◆ EraseLast()

    template<class TheItemType>
    void NCollection_DynamicArray< TheItemType >::EraseLast ( )
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ expandArray()

    template<class TheItemType>
    TheItemType * NCollection_DynamicArray< TheItemType >::expandArray ( )
    inlineprotected

    log2(myInternalSize) for fast index-to-block mapping

    ◆ First()

    template<class TheItemType>
    const_reference NCollection_DynamicArray< TheItemType >::First ( ) const
    inlinenoexcept
    Returns
    first element

    ◆ getArray() [1/2]

    template<class TheItemType>
    TheItemType *const * NCollection_DynamicArray< TheItemType >::getArray ( ) const
    inlineprotectednoexcept

    Wrapper to extract array of block pointers (const overload).

    ◆ getArray() [2/2]

    template<class TheItemType>
    TheItemType ** NCollection_DynamicArray< TheItemType >::getArray ( )
    inlineprotectednoexcept

    Wrapper to extract array of block pointers.

    ◆ InsertAfter() [1/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::InsertAfter ( const int theIndex,
    const TheItemType & theValue )
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ InsertAfter() [2/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::InsertAfter ( const int theIndex,
    TheItemType && theValue )
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ InsertAfter() [3/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::InsertAfter ( const size_t theIndex,
    const TheItemType & theValue )
    inline

    Insert a value after the element at theIndex, shifting subsequent elements right.

    Parameters
    theIndexindex after which to insert (must be in [0, Size()-1])
    theValuevalue to insert
    Returns
    reference to the inserted element

    ◆ InsertAfter() [4/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::InsertAfter ( const size_t theIndex,
    TheItemType && theValue )
    inline

    Insert a value after the element at theIndex (move version).

    ◆ InsertBefore() [1/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::InsertBefore ( const int theIndex,
    const TheItemType & theValue )
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ InsertBefore() [2/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::InsertBefore ( const int theIndex,
    TheItemType && theValue )
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ InsertBefore() [3/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::InsertBefore ( const size_t theIndex,
    const TheItemType & theValue )
    inline

    Insert a value before the element at theIndex, shifting it and subsequent elements right.

    Parameters
    theIndexindex before which to insert (must be in [0, Size()-1])
    theValuevalue to insert
    Returns
    reference to the inserted element

    ◆ InsertBefore() [4/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::InsertBefore ( const size_t theIndex,
    TheItemType && theValue )
    inline

    Insert a value before the element at theIndex (move version).

    ◆ IsEmpty()

    template<class TheItemType>
    bool NCollection_DynamicArray< TheItemType >::IsEmpty ( ) const
    inlinenoexcept

    Empty query.

    ◆ Last()

    template<class TheItemType>
    const_reference NCollection_DynamicArray< TheItemType >::Last ( ) const
    inlinenoexcept
    Returns
    last element

    ◆ Length()

    template<class TheItemType>
    int NCollection_DynamicArray< TheItemType >::Length ( ) const
    inlinenoexcept

    Total number of items (legacy int-returning API).

    ◆ log2Pow2()

    template<class TheItemType>
    constexpr size_t NCollection_DynamicArray< TheItemType >::log2Pow2 ( const size_t theValue)
    inlinestaticconstexprprotectednoexcept

    Compute log2 of a power-of-2 value.

    ◆ Lower()

    template<class TheItemType>
    int NCollection_DynamicArray< TheItemType >::Lower ( ) const
    inlinenoexcept

    Method for consistency with other collections.

    Returns
    Lower bound (inclusive) for iteration.

    ◆ operator()() [1/4]

    template<class TheItemType>
    const_reference NCollection_DynamicArray< TheItemType >::operator() ( const int theIndex) const
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ operator()() [2/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::operator() ( const int theIndex)
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ operator()() [3/4]

    template<class TheItemType>
    const_reference NCollection_DynamicArray< TheItemType >::operator() ( const size_t theIndex) const
    inlinenoexcept

    Operator() - query the const value.

    ◆ operator()() [4/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::operator() ( const size_t theIndex)
    inlinenoexcept

    Operator() - query the value.

    ◆ operator=() [1/2]

    template<class TheItemType>
    NCollection_DynamicArray & NCollection_DynamicArray< TheItemType >::operator= ( const NCollection_DynamicArray< TheItemType > & theOther)
    inline

    Assignment operator.

    ◆ operator=() [2/2]

    template<class TheItemType>
    NCollection_DynamicArray & NCollection_DynamicArray< TheItemType >::operator= ( NCollection_DynamicArray< TheItemType > && theOther)
    inlinenoexcept

    Assignment operator.

    ◆ operator[]() [1/4]

    template<class TheItemType>
    const_reference NCollection_DynamicArray< TheItemType >::operator[] ( const int theIndex) const
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ operator[]() [2/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::operator[] ( const int theIndex)
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ operator[]() [3/4]

    template<class TheItemType>
    const_reference NCollection_DynamicArray< TheItemType >::operator[] ( const size_t theIndex) const
    inlinenoexcept

    Operator[] - query the const value.

    ◆ operator[]() [4/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::operator[] ( const size_t theIndex)
    inlinenoexcept

    Operator[] - query the value.

    ◆ roundUpPow2()

    template<class TheItemType>
    constexpr size_t NCollection_DynamicArray< TheItemType >::roundUpPow2 ( const size_t theValue)
    inlinestaticconstexprprotectednoexcept

    Round up to the nearest power of 2 (returns theValue if already power of 2). Works correctly for both 32-bit and 64-bit size_t.

    ◆ SetIncrement() [1/2]

    template<class TheItemType>
    void NCollection_DynamicArray< TheItemType >::SetIncrement ( const int theIncrement)
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ SetIncrement() [2/2]

    template<class TheItemType>
    void NCollection_DynamicArray< TheItemType >::SetIncrement ( const size_t theIncrement)
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ SetValue() [1/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::SetValue ( const int theIndex,
    const TheItemType & theValue )
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ SetValue() [2/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::SetValue ( const int theIndex,
    TheItemType && theValue )
    inline

    log2(myInternalSize) for fast index-to-block mapping

    ◆ SetValue() [3/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::SetValue ( const size_t theIndex,
    const TheItemType & theValue )
    inline

    SetValue () - set or append a value.

    ◆ SetValue() [4/4]

    template<class TheItemType>
    reference NCollection_DynamicArray< TheItemType >::SetValue ( const size_t theIndex,
    TheItemType && theValue )
    inline

    SetValue () - set or append a value.

    ◆ Size()

    template<class TheItemType>
    size_t NCollection_DynamicArray< TheItemType >::Size ( ) const
    inlinenoexcept

    Total number of items in the vector.

    ◆ Upper()

    template<class TheItemType>
    int NCollection_DynamicArray< TheItemType >::Upper ( ) const
    inlinenoexcept

    Method for consistency with other collections.

    Returns
    Upper bound (inclusive) for iteration.

    ◆ Value() [1/2]

    template<class TheItemType>
    const_reference NCollection_DynamicArray< TheItemType >::Value ( const int theIndex) const
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    ◆ Value() [2/2]

    template<class TheItemType>
    const_reference NCollection_DynamicArray< TheItemType >::Value ( const size_t theIndex) const
    inlinenoexcept

    log2(myInternalSize) for fast index-to-block mapping

    Field Documentation

    ◆ const_iterator

    template<class TheItemType>
    friend NCollection_DynamicArray< TheItemType >::const_iterator

    log2(myInternalSize) for fast index-to-block mapping

    ◆ iterator

    template<class TheItemType>
    friend NCollection_DynamicArray< TheItemType >::iterator

    log2(myInternalSize) for fast index-to-block mapping

    ◆ myAlloc

    template<class TheItemType>
    allocator_type NCollection_DynamicArray< TheItemType >::myAlloc
    protected

    log2(myInternalSize) for fast index-to-block mapping

    ◆ myBlockMask

    template<class TheItemType>
    size_t NCollection_DynamicArray< TheItemType >::myBlockMask
    protected

    myInternalSize - 1 for fast index-within-block mapping

    ◆ myBlockShift

    template<class TheItemType>
    size_t NCollection_DynamicArray< TheItemType >::myBlockShift
    protected

    log2(myInternalSize) for fast index-to-block mapping

    ◆ myContainer

    template<class TheItemType>
    vector NCollection_DynamicArray< TheItemType >::myContainer
    protected

    log2(myInternalSize) for fast index-to-block mapping

    ◆ myInternalSize

    template<class TheItemType>
    size_t NCollection_DynamicArray< TheItemType >::myInternalSize
    protected

    log2(myInternalSize) for fast index-to-block mapping

    ◆ myUsedSize

    template<class TheItemType>
    size_t NCollection_DynamicArray< TheItemType >::myUsedSize
    protected

    log2(myInternalSize) for fast index-to-block mapping


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