Template class for Handle-managed sequences. Inherits from both NCollection_Sequence<TheItemType> and Standard_Transient, providing reference-counted sequence functionality.
More...
|
| | NCollection_HSequence ()=default |
| | Default constructor.
|
| |
| | NCollection_HSequence (const SequenceType &theOther) |
| | Copy constructor from sequence.
|
| |
| const SequenceType & | Sequence () const noexcept |
| | Returns const reference to the underlying sequence.
|
| |
| SequenceType & | ChangeSequence () noexcept |
| | Returns mutable reference to the underlying sequence.
|
| |
| void | Append (const TheItemType &theItem) |
| | Append single item.
|
| |
| void | Append (SequenceType &theSequence) |
| | Append another sequence.
|
| |
| template<class T > |
| void | Append (const opencascade::handle< T > &theOther, typename std::enable_if< std::is_base_of< NCollection_HSequence, T >::value >::type *=nullptr) |
| | Append items from another HSequence.
|
| |
| iterator | begin () const noexcept |
| | Returns an iterator pointing to the first element in the sequence.
|
| |
| iterator | end () const noexcept |
| | Returns an iterator referring to the past-the-end element in the sequence.
|
| |
| const_iterator | cbegin () const noexcept |
| | Returns a const iterator pointing to the first element in the sequence.
|
| |
| const_iterator | cend () const noexcept |
| | Returns a const iterator referring to the past-the-end element in the sequence.
|
| |
| | NCollection_Sequence () |
| | Empty constructor.
|
| |
| | NCollection_Sequence (const occ::handle< NCollection_BaseAllocator > &theAllocator) |
| | Constructor.
|
| |
| | NCollection_Sequence (const NCollection_Sequence &theOther) |
| | Copy constructor.
|
| |
| | NCollection_Sequence (NCollection_Sequence &&theOther) noexcept |
| | Move constructor.
|
| |
| int | Upper () const noexcept |
| | Method for consistency with other collections.
|
| |
| bool | IsEmpty () const noexcept |
| | Empty query.
|
| |
| void | Reverse () |
| | Reverse sequence.
|
| |
| void | Exchange (const size_t I, const size_t J) |
| | Exchange two members.
|
| |
| void | Exchange (const int I, const int J) |
| |
| void | Clear (const occ::handle< NCollection_BaseAllocator > &theAllocator=nullptr) |
| | Clear the items out, take a new allocator if non null.
|
| |
| NCollection_Sequence & | Assign (const NCollection_Sequence &theOther) |
| | Replace this sequence by the items of theOther. This method does not change the internal allocator.
|
| |
| NCollection_Sequence & | operator= (const NCollection_Sequence &theOther) |
| | Replacement operator.
|
| |
| NCollection_Sequence & | operator= (NCollection_Sequence &&theOther) noexcept |
| | Move operator.
|
| |
| void | Remove (Iterator &thePosition) |
| | Remove one item.
|
| |
| void | Remove (const size_t theIndex) |
| | Remove one item.
|
| |
| void | Remove (const int theIndex) |
| |
| void | Remove (const size_t theFromIndex, const size_t theToIndex) |
| | Remove range of items.
|
| |
| void | Remove (const int theFromIndex, const int theToIndex) |
| |
| void | Append (const TheItemType &theItem) |
| | Append one item.
|
| |
| void | Append (TheItemType &&theItem) |
| | Append one item.
|
| |
| void | Append (NCollection_Sequence &theSeq) |
| | Append another sequence (making it empty)
|
| |
| void | Prepend (const TheItemType &theItem) |
| | Prepend one item.
|
| |
| void | Prepend (TheItemType &&theItem) |
| | Prepend one item.
|
| |
| void | Prepend (NCollection_Sequence &theSeq) |
| | Prepend another sequence (making it empty)
|
| |
| void | InsertBefore (const size_t theIndex, const TheItemType &theItem) |
| | InsertBefore theIndex theItem.
|
| |
| void | InsertBefore (const int theIndex, const TheItemType &theItem) |
| |
| void | InsertBefore (const size_t theIndex, TheItemType &&theItem) |
| | InsertBefore theIndex theItem.
|
| |
| void | InsertBefore (const int theIndex, TheItemType &&theItem) |
| |
| void | InsertBefore (const size_t theIndex, NCollection_Sequence &theSeq) |
| | InsertBefore theIndex another sequence (making it empty)
|
| |
| void | InsertBefore (const int theIndex, NCollection_Sequence &theSeq) |
| |
| void | InsertAfter (Iterator &thePosition, const TheItemType &theItem) |
| | InsertAfter the position of iterator.
|
| |
| void | InsertAfter (Iterator &thePosition, TheItemType &&theItem) |
| | InsertAfter the position of iterator.
|
| |
| void | InsertAfter (const size_t theIndex, NCollection_Sequence &theSeq) |
| | InsertAfter theIndex another sequence (making it empty)
|
| |
| void | InsertAfter (const int theIndex, NCollection_Sequence &theSeq) |
| |
| void | InsertAfter (const size_t theIndex, const TheItemType &theItem) |
| | InsertAfter theIndex theItem.
|
| |
| void | InsertAfter (const int theIndex, const TheItemType &theItem) |
| |
| void | InsertAfter (const size_t theIndex, TheItemType &&theItem) |
| | InsertAfter theIndex theItem.
|
| |
| void | InsertAfter (const int theIndex, TheItemType &&theItem) |
| |
| template<typename... Args> |
| TheItemType & | EmplaceAppend (Args &&... theArgs) |
| | Emplace one item at the end, constructing it in-place.
|
| |
| template<typename... Args> |
| TheItemType & | EmplacePrepend (Args &&... theArgs) |
| | Emplace one item at the beginning, constructing it in-place.
|
| |
| template<typename... Args> |
| TheItemType & | EmplaceAfter (Iterator &thePosition, Args &&... theArgs) |
| | Emplace one item after the position of iterator, constructing it in-place.
|
| |
| template<typename... Args> |
| TheItemType & | EmplaceAfter (const size_t theIndex, Args &&... theArgs) |
| | Emplace one item after the specified index, constructing it in-place.
|
| |
| template<typename... Args> |
| TheItemType & | EmplaceAfter (const int theIndex, Args &&... theArgs) |
| |
| template<typename... Args> |
| TheItemType & | EmplaceBefore (const size_t theIndex, Args &&... theArgs) |
| | Emplace one item before the specified index, constructing it in-place.
|
| |
| template<typename... Args> |
| TheItemType & | EmplaceBefore (const int theIndex, Args &&... theArgs) |
| |
| void | Split (const size_t theIndex, NCollection_Sequence &theSeq) |
| | Split in two sequences.
|
| |
| void | Split (const int theIndex, NCollection_Sequence &theSeq) |
| |
| const TheItemType & | First () const |
| | First item access.
|
| |
| TheItemType & | ChangeFirst () |
| | First item access.
|
| |
| const TheItemType & | Last () const |
| | Last item access.
|
| |
| TheItemType & | ChangeLast () |
| | Last item access.
|
| |
| const TheItemType & | Value (const size_t theIndex) const |
| | Constant item access by theIndex.
|
| |
| const TheItemType & | Value (const int theIndex) const |
| |
| const TheItemType & | operator() (const size_t theIndex) const |
| | Constant operator()
|
| |
| const TheItemType & | operator() (const int theIndex) const |
| |
| TheItemType & | ChangeValue (const size_t theIndex) |
| | Variable item access by theIndex.
|
| |
| TheItemType & | ChangeValue (const int theIndex) |
| |
| TheItemType & | operator() (const size_t theIndex) |
| | Variable operator()
|
| |
| TheItemType & | operator() (const int theIndex) |
| |
| void | SetValue (const size_t theIndex, const TheItemType &theItem) |
| | Set item value by theIndex.
|
| |
| void | SetValue (const int theIndex, const TheItemType &theItem) |
| |
| const TheItemType & | At (const size_t theIndex) const |
| | 0-based checked access independent of Lower()/Upper().
|
| |
| TheItemType & | ChangeAt (const size_t theIndex) |
| | 0-based checked mutable access independent of Lower()/Upper().
|
| |
| | ~NCollection_Sequence () override |
| |
| bool | IsEmpty () const noexcept |
| |
| int | Length () const noexcept |
| | Number of items (legacy int-returning API).
|
| |
| size_t | Size () const noexcept |
| | Size - number of items.
|
| |
| const occ::handle< NCollection_BaseAllocator > & | Allocator () const noexcept |
| | Returns attached allocator.
|
| |
Public Member Functions inherited from Standard_Transient |
| | Standard_Transient () |
| | Empty constructor.
|
| |
| | Standard_Transient (const Standard_Transient &) |
| | Copy constructor – does nothing.
|
| |
| Standard_Transient & | operator= (const Standard_Transient &) |
| | Assignment operator, needed to avoid copying reference counter.
|
| |
| virtual | ~Standard_Transient ()=default |
| | Destructor must be virtual.
|
| |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| | Returns a type descriptor about this object.
|
| |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| | Returns a true value if this is an instance of Type.
|
| |
| bool | IsInstance (const char *const theTypeName) const |
| | Returns a true value if this is an instance of TypeName.
|
| |
| bool | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| | Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
| |
| bool | IsKind (const char *const theTypeName) const |
| | Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
| |
| Standard_Transient * | This () const |
| | Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
|
| |
| int | GetRefCount () const noexcept |
| | Get the reference counter of this object.
|
| |
| void | IncrementRefCounter () noexcept |
| | Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
|
| |
| int | DecrementRefCounter () noexcept |
| | Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
|
| |
| virtual void | Delete () const |
| | Memory deallocator for transient classes.
|
| |
Template class for Handle-managed sequences. Inherits from both NCollection_Sequence<TheItemType> and Standard_Transient, providing reference-counted sequence functionality.