31 #include <initializer_list> 39 #define GUM_DEFAULT_ITERATOR_NUMBER 4 47 #ifndef DOXYGEN_SHOULD_SKIP_THIS 49 template <
typename Val >
51 template <
typename Val >
53 template <
typename Val >
54 class ListConstIterator;
55 template <
typename Val >
56 class ListIteratorSafe;
57 template <
typename Val >
58 class ListConstIteratorSafe;
59 template <
typename Val,
typename Alloc >
62 #endif // DOXYGEN_SHOULD_SKIP_THIS 64 #ifndef SWIG // SWIG cannot read these lines 65 template <
typename Val,
typename Alloc >
67 std::ostream& operator<<(std::ostream& stream, const List< Val, Alloc >& list);
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS 79 extern const void*
const __list_end_safe;
80 extern const void*
const __list_end;
81 #endif // DOXYGEN_SHOULD_SKIP_THIS 101 template <
typename Val >
137 template <
typename... Args >
232 template <
typename T,
typename A >
368 template <
typename Val,
typename Alloc = std::allocator< Val > >
389 typename Alloc::template rebind< ListBucket< Val > >::other;
428 template <
typename OtherAlloc >
441 List(std::initializer_list< Val > list);
764 Val& pushFront(
const Val& val);
775 Val& pushFront(Val&& val);
786 template <
typename... Args >
787 Val& push_front(Args&&... args);
798 template <
typename... Args >
799 Val& emplaceFront(Args&&... args);
813 Val& pushBack(
const Val& val);
827 Val& pushBack(Val&& val);
837 template <
typename... Args >
838 Val& push_back(Args&&... args);
850 template <
typename... Args >
851 Val& emplaceBack(Args&&... args);
862 Val& insert(
const Val& val);
873 Val& insert(Val&& val);
888 Val& insert(
Size pos,
const Val& val);
901 Val& insert(
Size pos, Val&& val);
972 template <
typename... Args >
988 template <
typename... Args >
1007 Size size()
const noexcept;
1019 bool exists(
const Val& val)
const;
1065 void eraseByVal(
const Val& val);
1077 void eraseAllVal(
const Val& val);
1106 bool empty()
const noexcept;
1118 std::string toString()
const;
1127 template <
typename Mount,
typename OtherAlloc = std::allocator< Mount > >
1137 template <
typename Mount,
typename OtherAlloc = std::allocator< Mount > >
1147 template <
typename Mount,
typename OtherAlloc = std::allocator< Mount > >
1158 template <
typename Mount,
typename OtherAlloc = std::allocator< Mount > >
1204 template <
typename OtherAlloc >
1227 Val& operator+=(
const Val& val);
1241 Val& operator+=(Val&& val);
1252 template <
typename OtherAlloc >
1264 template <
typename OtherAlloc >
1279 Val& operator[](
const Size i);
1293 const Val& operator[](
const Size i)
const;
1322 template <
typename OtherAlloc >
1384 template <
typename... Args >
1504 template <
typename Val >
1534 template < typename Alloc >
1577 void clear() noexcept;
1582 void setToEnd() noexcept;
1590 bool isEnd() const noexcept;
1705 const Val& operator*() const;
1712 const Val* operator->() const;
1721 template < typename T, typename A >
1732 template <
typename Val >
1790 template <
typename Val >
1821 template < typename Alloc >
2026 template < typename Val >
2050 ListConstIteratorSafe() noexcept;
2056 template < typename Alloc >
2057 ListConstIteratorSafe(const
List< Val, Alloc >& theList);
2063 ListConstIteratorSafe(const ListConstIteratorSafe< Val >& src);
2073 template < typename Alloc >
2074 ListConstIteratorSafe(const
List< Val, Alloc >& theList,
Size ind_elt);
2080 ListConstIteratorSafe(ListConstIteratorSafe< Val >&& src);
2085 ~ListConstIteratorSafe();
2130 ListConstIteratorSafe< Val >&
2131 operator=(const ListConstIteratorSafe< Val >& src);
2139 ListConstIteratorSafe< Val >& operator=(ListConstIteratorSafe< Val >&& src);
2154 ListConstIteratorSafe< Val >& operator++() noexcept;
2176 ListConstIteratorSafe< Val >& operator--() noexcept;
2211 bool operator!=(const ListConstIteratorSafe< Val >& src) const;
2222 bool operator==(const ListConstIteratorSafe< Val >& src) const;
2229 const Val& operator*() const;
2236 const Val* operator->() const;
2244 template < typename T, typename A >
2250 const List< Val,
std::allocator< Val > >* __list{
nullptr};
2264 bool __null_pointing{
false};
2270 void __removeFromSafeList()
const;
2280 template <
typename Val >
2338 template <
typename Val >
2368 template < typename Alloc >
2385 template < typename Alloc >
2517 #ifndef DOXYGEN_SHOULD_SKIP_THIS 2532 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2533 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2534 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2539 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2540 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2541 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2546 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2547 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 2548 # 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.
Class providing aGrUM's "smart" pointers.
Generic doubly linked lists.
gum is the global namespace for all aGrUM entities
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.
template implementation of chained lists
~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.