About
maxon::BaseList is a class template for double linked lists. Elements of such a list should typically be access with iterators and not with indices.
Creation
A new list object can simply be created using the class template:
Definition: baselist.h:471
ResultRef< T > Append(ARG &&arg)
Definition: baselist.h:592
Int64 Int
signed 32/64 bit int, size depends on the platform
Definition: apibase.h:187
#define iferr_return
Definition: resultbase.h:1531
The complete content of the BaseList can be deleted with:
Data
A maxon::BaseList stores maxon::BaseListNode elements. Such nodes contain the actual stored value and also references to the previous and next node.
New elements are added to the list with:
ConstIterator Begin() const
Definition: baselist.h:1268
ResultRef< T > Insert(Int position)
Definition: baselist.h:702
If a given maxon::BaseList contains any elements can be checked with:
void Flush()
Deletes all elements (same as Reset() for the BaseList).
Definition: baselist.h:531
MAXON_ATTRIBUTE_FORCE_INLINE Bool IsEmpty() const
Definition: baselist.h:540
MAXON_ATTRIBUTE_FORCE_INLINE Bool IsPopulated() const
Definition: baselist.h:549
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:170
A specific element stored in the maxon::BaseList can be accessed by its index:
{
}
Int GetCount() const
Definition: baselist.h:559
Single elements of the maxon::BaseList can be removed with:
ResultPtr< T > Erase(Int position, Int eraseCnt=1)
Definition: baselist.h:909
MAXON_ATTRIBUTE_FORCE_INLINE auto begin(COLLECTION &&c) -> decltype(c.Begin())
Definition: foreach.h:361
The overall maxon::BaseList can be resized with:
Iterate
Using iterators it is easily possible to iterate over all elements stored in the maxon::BaseList:
void Swap(Iterator a, Iterator b)
Definition: baselist.h:1221
ConstIterator End() const
Definition: baselist.h:1290
MAXON_ATTRIBUTE_FORCE_INLINE auto end(COLLECTION &&c) -> decltype(c.End())
Definition: foreach.h:366
Utility
Utility functions are:
Further Reading