789 */ |
789 */ |
790 cx_attr_nodiscard |
790 cx_attr_nodiscard |
791 CX_EXPORT CxIterator cxListBackwardsIteratorAt(const CxList *list, size_t index); |
791 CX_EXPORT CxIterator cxListBackwardsIteratorAt(const CxList *list, size_t index); |
792 |
792 |
793 /** |
793 /** |
794 * Returns a mutating iterator pointing to the item at the specified index. |
|
795 * |
|
796 * The returned iterator is position-aware. |
|
797 * |
|
798 * If the index is out of range or @p list is @c NULL, a past-the-end iterator will be returned. |
|
799 * |
|
800 * @param list the list |
|
801 * @param index the index where the iterator shall point at |
|
802 * @return a new iterator |
|
803 */ |
|
804 cx_attr_nodiscard |
|
805 CX_EXPORT CxIterator cxListMutIteratorAt(CxList *list, size_t index); |
|
806 |
|
807 /** |
|
808 * Returns a mutating backwards iterator pointing to the item at the |
|
809 * specified index. |
|
810 * |
|
811 * The returned iterator is position-aware. |
|
812 * |
|
813 * If the index is out of range or @p list is @c NULL, a past-the-end iterator will be returned. |
|
814 * |
|
815 * @param list the list |
|
816 * @param index the index where the iterator shall point at |
|
817 * @return a new iterator |
|
818 */ |
|
819 cx_attr_nodiscard |
|
820 CX_EXPORT CxIterator cxListMutBackwardsIteratorAt(CxList *list, size_t index); |
|
821 |
|
822 /** |
|
823 * Returns an iterator pointing to the first item of the list. |
794 * Returns an iterator pointing to the first item of the list. |
824 * |
795 * |
825 * The returned iterator is position-aware. |
796 * The returned iterator is position-aware. |
826 * |
797 * |
827 * If the list is empty or @c NULL, a past-the-end iterator will be returned. |
798 * If the list is empty or @c NULL, a past-the-end iterator will be returned. |
831 */ |
802 */ |
832 cx_attr_nodiscard |
803 cx_attr_nodiscard |
833 CX_EXPORT CxIterator cxListIterator(const CxList *list); |
804 CX_EXPORT CxIterator cxListIterator(const CxList *list); |
834 |
805 |
835 /** |
806 /** |
836 * Returns a mutating iterator pointing to the first item of the list. |
|
837 * |
|
838 * The returned iterator is position-aware. |
|
839 * |
|
840 * If the list is empty or @c NULL, a past-the-end iterator will be returned. |
|
841 * |
|
842 * @param list the list |
|
843 * @return a new iterator |
|
844 */ |
|
845 cx_attr_nodiscard |
|
846 CX_EXPORT CxIterator cxListMutIterator(CxList *list); |
|
847 |
|
848 /** |
|
849 * Returns a backwards iterator pointing to the last item of the list. |
807 * Returns a backwards iterator pointing to the last item of the list. |
850 * |
808 * |
851 * The returned iterator is position-aware. |
809 * The returned iterator is position-aware. |
852 * |
810 * |
853 * If the list is empty or @c NULL, a past-the-end iterator will be returned. |
811 * If the list is empty or @c NULL, a past-the-end iterator will be returned. |
855 * @param list the list |
813 * @param list the list |
856 * @return a new iterator |
814 * @return a new iterator |
857 */ |
815 */ |
858 cx_attr_nodiscard |
816 cx_attr_nodiscard |
859 CX_EXPORT CxIterator cxListBackwardsIterator(const CxList *list); |
817 CX_EXPORT CxIterator cxListBackwardsIterator(const CxList *list); |
860 |
|
861 /** |
|
862 * Returns a mutating backwards iterator pointing to the last item of the list. |
|
863 * |
|
864 * The returned iterator is position-aware. |
|
865 * |
|
866 * If the list is empty or @c NULL, a past-the-end iterator will be returned. |
|
867 * |
|
868 * @param list the list |
|
869 * @return a new iterator |
|
870 */ |
|
871 cx_attr_nodiscard |
|
872 CX_EXPORT CxIterator cxListMutBackwardsIterator(CxList *list); |
|
873 |
818 |
874 /** |
819 /** |
875 * Returns the index of the first element that equals @p elem. |
820 * Returns the index of the first element that equals @p elem. |
876 * |
821 * |
877 * Determining equality is performed by the list's comparator function. |
822 * Determining equality is performed by the list's comparator function. |