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
    IntPolyh_Array< Type > Class Template Reference

    #include <IntPolyh_Array.hxx>

    Public Types

    typedef NCollection_DynamicArray< Type > IntPolyh_VectorOfType

    Public Member Functions

     IntPolyh_Array (const int aIncrement=256)
     IntPolyh_Array (const int aN, const int aIncrement=256)
    IntPolyh_Arrayoperator= (const IntPolyh_Array &aOther)
    IntPolyh_ArrayCopy (const IntPolyh_Array &aOther)
    void Init (const int aN)
    void IncrementNbItems ()
    int GetN () const
    int NbItems () const
    void SetNbItems (const int aNb)
    const Type & Value (const int aIndex) const
    const Type & operator[] (const int aIndex) const
    Type & ChangeValue (const int aIndex)
    Type & operator[] (const int aIndex)
    void Dump () const

    Protected Attributes

    int myNbAllocated
    int myNbItems
    int myIncrement
    IntPolyh_VectorOfType myVectorOfType

    Detailed Description

    template<class Type>
    class IntPolyh_Array< Type >

    Class IntPolyh_Array (dynamic array of objects)

    1. The Array is dynamic array of objects.
    2. The Array uses NCollection_DynamicArray to store objects
    3. The Array can be created: 3.1. with initial length Nb=0. In this case Array should be initiated by invoke the method Init(Nb). 3.2. with initial length Nb>0. In this case Array is initiated automatically.

      The memory is allocated to store myNbAllocated oblects.

    4. The number of items that are stored in the Array (myNbItems) can be increased by calling the method: IncrementNbItems(). The objects are stored in already allocated memory if it is possible. Otherwise the new chunk of memory is allocated to store the objects. The size of chunk <aIncrement> can be defined during the creation of the Array.
    5. The start index of the Array is 0, The end index of the Array can be obtained by the method NbItems();
    6. The contents of the element with index "i" can be queried or modified by the methods: Value(i), ChangeValue(i), operator[](i)

    Member Typedef Documentation

    ◆ IntPolyh_VectorOfType

    template<class Type>
    typedef NCollection_DynamicArray<Type> IntPolyh_Array< Type >::IntPolyh_VectorOfType

    Constructor & Destructor Documentation

    ◆ IntPolyh_Array() [1/2]

    template<class Type>
    IntPolyh_Array< Type >::IntPolyh_Array ( const int aIncrement = 256)
    inline

    Constructor.

    Parameters
    aIncrementsize of memory (in terms of Items) to expand the array

    ◆ IntPolyh_Array() [2/2]

    template<class Type>
    IntPolyh_Array< Type >::IntPolyh_Array ( const int aN,
    const int aIncrement = 256 )
    inline

    Constructor.

    Parameters
    aNsize of memory (in terms of Items) to allocate
    aIncrementsize of memory (in terms of Items) to expand the array

    Member Function Documentation

    ◆ ChangeValue()

    template<class Type>
    Type & IntPolyh_Array< Type >::ChangeValue ( const int aIndex)
    inline

    query the value

    Parameters
    aIndexindex
    Returns
    the item

    ◆ Copy()

    template<class Type>
    IntPolyh_Array & IntPolyh_Array< Type >::Copy ( const IntPolyh_Array< Type > & aOther)
    inline

    Copy

    Parameters
    aOther- the array to copy from
    Returns
    the array

    ◆ Dump()

    template<class Type>
    void IntPolyh_Array< Type >::Dump ( ) const
    inline

    dump the contents

    ◆ GetN()

    template<class Type>
    int IntPolyh_Array< Type >::GetN ( ) const
    inline

    GetN - returns the number of 'allocated' items

    Returns
    the number of 'allocated' items

    ◆ IncrementNbItems()

    template<class Type>
    void IntPolyh_Array< Type >::IncrementNbItems ( )
    inline

    IncrementNbItems - increment the number of stored items

    ◆ Init()

    template<class Type>
    void IntPolyh_Array< Type >::Init ( const int aN)
    inline

    Init - allocate memory for <aN> items

    Parameters
    aN- the number of items to allocate the memory

    ◆ NbItems()

    template<class Type>
    int IntPolyh_Array< Type >::NbItems ( ) const
    inline

    NbItems - returns the number of stored items

    Returns
    the number of stored items

    ◆ operator=()

    template<class Type>
    IntPolyh_Array & IntPolyh_Array< Type >::operator= ( const IntPolyh_Array< Type > & aOther)
    inline

    Assignment operator

    Parameters
    aOther- the array to copy from
    Returns
    the array

    ◆ operator[]() [1/2]

    template<class Type>
    Type & IntPolyh_Array< Type >::operator[] ( const int aIndex)
    inline

    query the value

    Parameters
    aIndexindex
    Returns
    the item

    ◆ operator[]() [2/2]

    template<class Type>
    const Type & IntPolyh_Array< Type >::operator[] ( const int aIndex) const
    inline

    query the const value

    Parameters
    aIndexindex
    Returns
    the const item

    ◆ SetNbItems()

    template<class Type>
    void IntPolyh_Array< Type >::SetNbItems ( const int aNb)
    inline

    set the number of stored items

    Parameters
    aNbthe number of stored items

    ◆ Value()

    template<class Type>
    const Type & IntPolyh_Array< Type >::Value ( const int aIndex) const
    inline

    query the const value

    Parameters
    aIndexindex
    Returns
    the const item

    Field Documentation

    ◆ myIncrement

    template<class Type>
    int IntPolyh_Array< Type >::myIncrement
    protected

    ◆ myNbAllocated

    template<class Type>
    int IntPolyh_Array< Type >::myNbAllocated
    protected

    ◆ myNbItems

    template<class Type>
    int IntPolyh_Array< Type >::myNbItems
    protected

    ◆ myVectorOfType

    template<class Type>
    IntPolyh_VectorOfType IntPolyh_Array< Type >::myVectorOfType
    protected

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