Iterator(3U)

✨ Iterator(3U) ✨

okay bestie, so this is a page from the InterViews Reference Manual and it's literally all about Iterator πŸ’…


πŸŽ€ NAME πŸŽ€

Iterator β€” marks a position in a data structure


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Unidraw/iterator.h>

🌸 DESCRIPTION 🌸

So like. An iterator marks a position in a data structure, generally during a traversal of some sort. It's giving bookmark but for data πŸ”–

For example, an iterator keeps track of the current position when iterating through a list of elements. And Unidraw's Iterator class serves this exact purpose, in conjunction with ULists or objects that use them. Periodt. πŸ‘‘


πŸ’– PUBLIC OPERATIONS πŸ’–

  • Iterator()
  • Iterator(Iterator&)

Construct a new iterator ✨ The second constructor initializes the iterator's value to that of the given iterator. (Yes bestie, copy-paste energy, but make it intentional.)

  • virtual void SetValue(void*)
  • virtual void* GetValue()

Classes that use an iterator must store position information in it β€” no cap, that's the whole job. These operations set and get this information. πŸ”₯


🌈 SEE ALSO 🌈

  • UList(3U)

lowkey a tiny class, but she's main character energy in every traversal iykyk 🧚

okay that's the whole thing, and fr fr you now know Iterator better than you know your own sleep schedule πŸ’€ This icon was brought to you by Unidraw, dated 11 June 1990 β€” vintage but still serving 🫢🌸