* Add ranges * Initial Hugo setup * Work in progress * Added selection for local or remote site * Updated to 'light' theme * Changed to using Hextra Hugo theme * Changed to using Hextra Hugo theme * Changed to Hextra Hugo theme * Change to Hextra Hugo theme * Updated Hugo setup. * Updated Hugo setup. # Conflicts: # docs/releases/_index.md * Work in progress * Added new fonts Added new documentation * Latest documentation updates * Latest documentation updates # Conflicts: # docs/containers/array.md # docs/containers/array_view.md # docs/containers/array_wrapper.md # docs/containers/bip_buffer_spsc_atomic.md # docs/containers/bitset.md # docs/containers/indirect_vector.md # docs/containers/vector.md # docs/getting-started/compilers.md * Added bloom_filter markdown doc * Added more documentation Updated CSS for light and dark modes * Fixed some menus Added mode documentation files * Updated CSS rules Added badges to home page Added uniqur_ptr + pool tutorial * Fixed formatting on the home page markdown Modified light amd dark code formatting * Updated unique_ptr-with-pool * Added container and shared message tutorials * Updates to documentation * Added const_multimap * Updated source-formatting.md * Added initial raw text files form Web site editor * Innore coverage build directory * Exported raw text documentation files from the web site editor * Hugo updates * Added Hugo intalation and markdown descriptions * More addition to the documentation * Added closure.md and updates to delegate.md * Added format.md * Added documentation for etl::delegate_observable, etl::function, Base64 codec * Added io_port documentation * Added basic_format_spec * Added documentation for string_stream and string utilities. * Added more documentation Updated the documentation CSS * Added documentation for clocks, day, duration * Added more documentation for chrono classes Updated callouts * More chrono documentation * Completed chrono documentation * Maths functions documentation * Completed maths documentation * Completed maths documentation * Completed maths documentation * Completed maths documentation * Added multiple documentation files * Added iterator.md * Added debug_count.md and versions.md * Added debug_count.md and versions.md * Added more documentation * More documentation * Added some design pattern documentation Modified some of the layout files Modified the About documentation * Converted more documentation pages Modified the site CSS * Added more documentation Moced some documentation files to new directories * Added more documentation Tweaks to CSS * Added callback_timer_deferred_locked documentation * Added callback_timer_locked documentation * More documentation updates * More documentation updates * More documentation updates * New documentation files. Harmonised file name format * New documentation files. * Multiple document updates * Multiple document updates * Final conversion of web pages * Updates before PR * Updates before PR * Updates before PR # Conflicts: # docs/blog/_index.md * Final pre PR updates * Updates to message framework documentation * Renamed directory * Fix spelling * Added author and date to blog files Moved documentation files merged from development * Fixed 'Description' typo * Fix typos # Conflicts: # docs/IO/io_port.md # docs/containers/sets/const-multiset.md # docs/containers/sets/const-set.md # docs/maths/correlation.md # docs/maths/gamma.md * Renamed two files to lower case * Minor renaming * Added author and date * Updated callout on bresenham_line.md Added support for showing the ETL version on the documentation first page, by copying the version.txt file as a hugo asset. Updated the Python 'update_release.py' to copy 'version.txt' * Replace space in filename with hyphen. Added more information to hugo-commands.md * Replace space in filename with hyphen. Added more information to hugo-commands.md # Conflicts: # docs/getting-started/view-the-docs-locally/hugo-commands.md * Added a link to pseudo_moving_average.md * Updated title pages for groups * Fixed missing 404 for non-existent pages * Fixed coordinate variable names in the 'Calculating the intersection' example --------- Co-authored-by: Roland Reichwein <Roland.Reichwein@bmw.de> Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.com> Co-authored-by: John Wellbelove <john.wellbelove@etlcpp.co.uk>
6.6 KiB
| title | weight |
|---|---|
| intrusive_list | 2 |
{{< callout type="info">}}
Header: intrusive_list.h
Similar to: std::list
{{< /callout >}}
An intrusive list.
template <typename TValue, typename TLink>
etl::intrusive_list
TValue is the type that contains the actual values. It is derived from Tlink. Tlink is the link type for this list.
See Intrusive links.
Before 20.37.0 the default link type was etl::bidirectional_link<0>.
Member types
link_type TLink
value_type TValue
pointer value_type*
const_pointer const value_type*
reference value_type&
const_reference const value_type&
size_type size_t
Constructors
etl::intrusive_list<typename TValue, typename TLink>()
Default constructor.
template <typename TIterator>
etl::intrusive_list<typename TValue, typename TLink>(TIterator begin, TIterator end)
Description
Creates the list from the range [begin, end) of node links.
template <typename... TLinks>
intrusive_list(TLink& first, TLinks&... links))
Description
Creates the list from node link references.
Element access
TValue& front()
const T& front() const
Description
Returns a reference or const reference to the first element.
TValue& back()
const T& back() const
Description
Returns a reference or const reference to the last element.
Iterators
iterator begin()
const_iterator begin() const
const_iterator cbegin() const
Description
Returns an iterator to the beginning of the list.
iterator end()
const_iterator end() const
const_iterator cend() const
Description
Returns an iterator to the end of the list.
iterator rbegin()
const_iterator rbegin() const
const_iterator crbegin() const
Description
Returns a reverse iterator to the beginning of the list.
iterator rend()
const_iterator rend() const
const_iterator crend() const
Description
Returns a reverse iterator to the end of the list.
Capacity
bool empty() const
Description
Returns true if the size of the list is zero, otherwise false.
size_t size() const
Description
Returns the size of the list.
Modifiers
template <typename TIterator>
void assign(TIterator begin, TIterator end))
Description
Fills the list with the values.
void push_front(value_type& value))
Description
Pushes a value to the front of the list.
void push_back(value_type& value))
Description
Pushes a value to the back of the list.
void pop_front())
Description
Pop a value from the front of the list.
Emits an etl::intrusive_list_empty if the list is empty.
If asserts or exceptions are disabled then undefined behaviour occurs.
void pop_back())
Description
Pop a value from the back of the list.
Emits an etl::intrusive_list_empty if the list is empty.
If asserts or exceptions are disabled then undefined behaviour occurs.
template <typename TIterator>
void insert(iterator position, TIterator begin, TIterator end))
Description
iterator insert(iterator position, value_type& value))
Description
Inserts values in to the list.
position is not checked for validity.
template <typename TIterator>
iterator erase(TIterator begin, TIterator end))
Description
Erases the range [begin, end).
iterator erase(iterator position))
Description
Erases values in the list.
Iterators are not checked for validity.
void clear())
Description
Clears the list to a size of zero. No elements are destructed.
void splice(iterator position, list_type& list))
void splice(iterator position, list_type& list, iterator isource))
void splice(iterator position, list_type& list, iterator begin_, iterator end_))
Description
Splices elements from a list into this list.
Iterators are not checked for validity.
void merge(list_type& list))
Description
Merges the sorted elements of 'list' into this list. Merges are stable.
If a debug compile and asserts or exceptions are enabled than an etl::intrusive_list_unsorted is emitted if either list is unsorted, otherwise undefined behaviour occurs.
template <typename TCompare>
void merge(list_type& list, Tcompare compare))
Description
Merges the sorted elements of list into this list. Comparison functor is supplied in compare. Merges are stable.
If a debug compile and asserts or exceptions are enabled than an etl::intrusive_list_unsorted is emitted if either list is unsorted, otherwise undefined behaviour occurs.
Operations
void remove(const T& value))
Description
Removes from the container all the elements that compare equal to value.
template <typename TPredicate>
void remove_if(TPredicate predicate))
Description
Removes from the container all the elements that satisfy predicate.
void unique())
Description
Removes all but the first element from every group of consecutive elements.
template <typename TPredicate>
void unique(TPredicate predicate))
Description
Removes all but the first element from every group of consecutive elements that satisfy the binary predicate.
void sort())
Description
Sorts using the < operator.
template <typename TCompare>
void sort(TCompare compare))
Description
Uses the supplied compare function.
void reverse())
Description
Reverses the order of the list.
Non-member functions
operator ==
Description
true if the contents of the lists are equal, otherwise false.
operator !=
Description
true if the contents of the lists are not equal, otherwise false.
operator <
Description
true if the contents of the lhs are lexicographically less than the contents of the rhs, otherwise false.
operator <=
Description
true if the contents of the lhs are lexicographically less than or equal to the contents of the rhs, otherwise false.
operator >
Description
true if the contents of the lhs are lexicographically greater than the contents of the rhs, otherwise false.
operator >=
Description
true if the contents of the lhs are lexicographically greater than or equal to the contents of the rhs, otherwise false.