34 #include <initializer_list> 42 #define GUM_DEFAULT_ITERATOR_NUMBER 4 50 #ifndef DOXYGEN_SHOULD_SKIP_THIS 52 template <
typename Val >
54 template <
typename Val >
56 template <
typename Val >
57 class ListConstIterator;
58 template <
typename Val >
59 class ListIteratorSafe;
60 template <
typename Val >
61 class ListConstIteratorSafe;
62 template <
typename Val,
typename Alloc >
65 #endif // DOXYGEN_SHOULD_SKIP_THIS 67 #ifndef SWIG // SWIG cannot read these lines 68 template <
typename Val,
typename Alloc >
70 std::ostream& operator<<(std::ostream& stream, const List< Val, Alloc >& list);
73 #ifndef DOXYGEN_SHOULD_SKIP_THIS 82 extern const void*
const __list_end_safe;
83 extern const void*
const __list_end;
84 #endif // DOXYGEN_SHOULD_SKIP_THIS 104 template <
typename Val >
140 template <
typename... Args >
235 template <
typename T,
typename A >
371 template <
typename Val,
typename Alloc = std::allocator< Val > >
392 typename Alloc::template rebind< ListBucket< Val > >::other;
431 template <
typename OtherAlloc >
444 List(std::initializer_list< Val > list);
767 Val& pushFront(
const Val& val);
778 Val& pushFront(Val&& val);
789 template <
typename... Args >
790 Val& push_front(Args&&... args);
801 template <
typename... Args >
802 Val& emplaceFront(Args&&... args);
816 Val& pushBack(
const Val& val);
830 Val& pushBack(Val&& val);
840 template <
typename... Args >
841 Val& push_back(Args&&... args);
853 template <
typename... Args >
854 Val& emplaceBack(Args&&... args);
865 Val& insert(
const Val& val);
876 Val& insert(Val&& val);
891 Val& insert(
Size pos,
const Val& val);
904 Val& insert(
Size pos, Val&& val);
975 template <
typename... Args >
991 template <
typename... Args >
1010 Size size()
const noexcept;
1022 bool exists(
const Val& val)
const;
1068 void eraseByVal(
const Val& val);
1080 void eraseAllVal(
const Val& val);
1109 bool empty()
const noexcept;
1121 std::string toString()
const;
1130 template <
typename Mount,
typename OtherAlloc = std::allocator< Mount > >
1140 template <
typename Mount,
typename OtherAlloc = std::allocator< Mount > >
1150 template <
typename Mount,
typename OtherAlloc = std::allocator< Mount > >
1161 template <
typename Mount,
typename OtherAlloc = std::allocator< Mount > >
1207 template <
typename OtherAlloc >
1230 Val& operator+=(
const Val& val);
1244 Val& operator+=(Val&& val);
1255 template <
typename OtherAlloc >
1267 template <
typename OtherAlloc >
1282 Val& operator[](
const Size i);
1296 const Val& operator[](
const Size i)
const;
1325 template <
typename OtherAlloc >
1387 template <
typename... Args >
1507 template <
typename Val >
1537 template < typename Alloc >
1580 void clear() noexcept;
1585 void setToEnd() noexcept;
1593 bool isEnd() const noexcept;
1708 const Val& operator*() const;
1715 const Val* operator->() const;
1724 template < typename T, typename A >
1735 template <
typename Val >
1793 template <
typename Val >
1824 template < typename Alloc >
2029 template < typename Val >
2053 ListConstIteratorSafe() noexcept;
2059 template < typename Alloc >
2060 ListConstIteratorSafe(const
List< Val, Alloc >& theList);
2066 ListConstIteratorSafe(const ListConstIteratorSafe< Val >& src);
2076 template < typename Alloc >
2077 ListConstIteratorSafe(const
List< Val, Alloc >& theList,
Size ind_elt);
2083 ListConstIteratorSafe(ListConstIteratorSafe< Val >&& src);
2088 ~ListConstIteratorSafe();
2133 ListConstIteratorSafe< Val >&
2134 operator=(const ListConstIteratorSafe< Val >& src);
2142 ListConstIteratorSafe< Val >& operator=(ListConstIteratorSafe< Val >&& src);
2157 ListConstIteratorSafe< Val >& operator++() noexcept;
2179 ListConstIteratorSafe< Val >& operator--() noexcept;
2214 bool operator!=(const ListConstIteratorSafe< Val >& src) const;
2225 bool operator==(const ListConstIteratorSafe< Val >& src) const;
2232 const Val& operator*() const;
2239 const Val* operator->() const;
2247 template < typename T, typename A >
2253 const List< Val,
std::allocator< Val > >* __list{
nullptr};
2267 bool __null_pointing{
false};
2273 void __removeFromSafeList()
const;
2283 template <
typename Val >
2341 template <
typename Val >
2371 template < typename Alloc >
2388 template < typename Alloc >
2520 #ifndef DOXYGEN_SHOULD_SKIP_THIS 2535 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2536 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2537 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2542 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2543 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2544 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2549 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2550 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2551 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS ListBucket< Val > * __next
Chaining toward the adjacent elements.
aGrUM's Potential is a multi-dimensional array with tensor operators.
ListConstIteratorSafe() noexcept
Default constructor.
Val & reference
Types for STL compliance.
Val value_type
Types for STL compliance.
Safe iterators for Lists.
ListBucket< Val > * __prev
Chaining toward the adjacent elements.
Unsafe but fast iterators for Lists.
location
Locations around iterators where insertions of new elements can take / place.
const Val & const_reference
Types for STL compliance.
std::ptrdiff_t difference_type
Types for STL compliance.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Generic doubly linked lists.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
std::allocator< const gum::Potential< GUM_SCALAR > * > allocator_type
bool operator!=(const ListBucket< Val > &src) const
Inequality check.
const ListBucket< Val > * previous() const noexcept
Returns the bucket toward the preceding element.
friend class List
All the list containers and iterators should be able to access the buckets.
Val * pointer
Types for STL compliance.
Emplace
C dummy type for the emplace constructor.
std::ptrdiff_t difference_type
std::vector< const_iterator_safe *> __safe_iterators
The list of "safe" iterators attached to the list.
ListBucket()=delete
Removes empty constructor.
const const gum::Potential< GUM_SCALAR > * & const_reference
Val * pointer
Types for STL compliance.
std::bidirectional_iterator_tag iterator_category
Types for STL compliance.
std::ptrdiff_t difference_type
Types for STL compliance.
Val & reference
Types for STL compliance.
bool operator==(const ListBucket< Val > &src) const
Equality check.
ListConstIterator< Val >::difference_type operator-(const ListConstIterator< Val > &iter1, const ListConstIterator< Val > &iter2)
For STL compliance, a distance operator.
const ListBucket< Val > * next() const noexcept
Returns the bucket toward the next element.
Unsafe but fast const iterators for Lists.
const const gum::Potential< GUM_SCALAR > * * const_pointer
Val & operator*() noexcept
Dereferencing operator.
Val __val
Val is the value contained in the box.
const Val * const_pointer
Types for STL compliance.
ListBucket< Val > & operator=(const ListBucket< Val > &src)
Copy operator.
Safe const iterators for Lists.
Bucket for a chained list.
const Val & const_reference
Types for STL compliance.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
~ListBucket()
Class destructor.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
void swap(RefPtr< Val > &ptr1, RefPtr< Val > &ptr2)
Swap the contents of two RefPtr.
BucketAllocator __alloc_bucket
The allocator for the buckets.
const Val * const_pointer
Types for STL compliance.
typename std::allocator< const gum::Potential< GUM_SCALAR > * > ::template rebind< ListBucket< const gum::Potential< GUM_SCALAR > * > >::other BucketAllocator
Type of the allocator for ListBuckets.
Val value_type
Types for STL compliance.
std::bidirectional_iterator_tag iterator_category
Types for STL compliance.