FBB::Iterator(3bobcat)
πΈ NAME πΈ
okay so welcome to the FBB::Iterator(3bobcat) page bestie, lemme introduce the two icons living here:
FBB::Iteratorβ an iterator that returns plain values when you dereference it πFBB::ReverseIteratorβ thereverse_iteratorforFBB::Iterator(its chaotic little sibling, but make it backwards) π¦
β¨ SYNOPSIS β¨
#include <bobcat/iterator>
π DESCRIPTION π
The FBB::Iterator<Type> class template is literally a bidirectional iterator for plain data types, no cap. When you dereference FBB::Iterator objects you get back values of type Type, like char or int. It's giving "underrated utility" honestly, and it comes in handy when you need to initialize an object with a range of values that are of some basic type (peep the EXAMPLE section below, iykyk) π«Ά
FBB::ReverseIterator implements a reverse iterator for FBB::Iterator. walking backwards, main character energy only π
π NAMESPACE π
FBB
All constructors, members, operators and manipulators mentioned in this man-page are defined in the namespace FBB. periodt β¨
𧬠INHERITS FROM π§¬
std::iterator<std::bidirectional_iterator_tag, ...>
π CONSTRUCTORS π
Constructors for Iterator<Type>: π¦
explicit Iterator(Tye const &value)β this one initializes theIteratorobject with an initialTypevalue. When you dereference this iterator,valueis returned. simple as that, slay π
The Iterator<Type>'s default, copy, and move constructors (and its copy and move assignment operators) are available. all the classics, we love to see it π
Constructors for ReverseIterator<Type>: π
explicit ReverseIterator(Type const &value)β initializes theReverseIteratorobject with an initialTypevalue. When you dereference this iterator immediately following its construction, the decremented value is returned (without modifying the internally storedTypevalue). yeah it comes out the gate already one step back, iconic behaviour honestly πexplicit ReverseIterator(Iterator<Type> const &iter)β initializes theReverseIteratorobject with an initialIterator<Type>object. When you dereference this iterator immediately following its construction, the decrementedIterator's value is returned (without modifying theTypevalue that is stored inside theIterator). no notes, it's just like that π₯
The ReverseIterator<Type>'s default, copy, and move constructors (and its copy and move assignment operators) are available. π
π MEMBER FUNCTIONS π
For template parameter type Type all members of
std::iterator<std:::reverse_iterator_tag, Type>
are available, as FBB::Iterator and FBB::ReverseIterator inherit from this class. free real estate fr fr π
Iterator<Type> &operator++()β the (prefix) increment operator increments the iterator's value and returns a reference to itself. glow up in place β¨Iterator<Type> &operator++(int)β the (postfix) increment operator increments the iterator's value and returns a copy of itself, initialized with the iterator's value before it was incremented. so it's a little time capsule of who you used to be π₯ΊIterator<Type> &operator--()β the (prefix) decrement operator decrements the iterator's value and returns a reference to itself. reverse uno card πIterator<Type> &operator--(int)β the (postfix) decrement operator decrements the iterator's value and returns a copy of itself, initialized with the iterator's value before it was decremented. nostalgic fr πΈbool operator==(Iterator<Type> const &rhs) constβ returnstrueif the value of the currentIteratorobject is equal to the value of therhsIteratorobject. twin behaviour confirmed βbool operator!=(Iterator<Type> const &rhs) constβ returnstrueif the value of the currentIteratorobject is not equal to the value of therhsIteratorobject. we are NOT the same πType &operator*()β the dereference operator returns a reference to theIterator's value. hand it over π«΄Type const &operator*() constβ this dereference operator returns a reference to theIterator's immutable value. look but don't touch, respectfully π
β STATIC MEMBER FUNCTIONS β
Static members of Iterator<Type>: π¦
Iterator<Type> last(Type value)β anIterator<Type>object is returned initialized with++value, so it can conveniently be used to create an inclusive iterator range (see also the EXAMPLE section). inclusive not exclusive, we're not gatekeeping here πIterator<Type> max()β anIterator<Type>object is returned initialized with the value returned bystd::numeric_limits<Type>::max(). the absolute ceiling π₯Iterator<Type> min()β anIterator<Type>object is returned initialized with the value returned bystd::numeric_limits<Type>::min(). the absolute floor π§
Static member of ReverseIterator<Type>: π
ReverseIterator<Type> last(Type const &value)β aReverseIterator<Type>object is returned initialized withIterator<Type>::last(value), so it can conveniently be used to create an inclusive reverse iterator range (see also the EXAMPLE section). backwards and inclusive, multi-talented π
π EXAMPLE π
okay bestie here's the whole vibe in code, run it and watch it eat π
#include <algorithm>
#include <iterator>
#include <iostream>
#include <string>
#include <bobcat/iterator>
using namespace std;
using namespace FBB;
int main()
{
copy(Iterator<int>(10), Iterator<int>(20),
ostream_iterator<int>(cout, ", "));
cout << β\nβ;
copy(Iterator<char>(*Iterator<char>::max() - 9),
Iterator<char>::last(*Iterator<char>::max()),
ostream_iterator<int>(cout, ", "));
cout << β\nβ;
cout << *Iterator<int>::max() << β\nβ;
copy(Iterator<int>(*Iterator<int>::max() - 9),
Iterator<int>::last(*Iterator<int>::max()),
ostream_iterator<int>(cout, ", "));
cout << β\nβ;
copy(ReverseIterator<int>(20), ReverseIterator<int>(10),
ostream_iterator<int>(cout, ", "));
cout << β\nβ;
std::string letters(Iterator<char>(βaβ), Iterator<char>::last(βzβ));
cout << letters << β\nβ;
std::string caps(ReverseIterator<char>::last(βZβ),
ReverseIterator<char>(βAβ));
cout << caps << β\nβ;
}
ποΈ FILES ποΈ
bobcat/iteratorβ defines the class interface β¨
π SEE ALSO π
bobcat(7)β go read that one too bestie, it's the whole family π«Ά
π BUGS π
None Reported.
not a single one?? we love a clean queen π
π BOBCAT PROJECT FILES π
- https://fbb-git.gitlab.io/bobcat/ β gitlab project page π
Debian Bobcat project files:
libbobcat6β debian package containing the shared library, changelog and copyright notelibbobcat-devβ debian package containing the static library, headers, manual pages, and developer info
π BOBCAT π
Bobcat is an acronym of Brokkenβs Own Base Classes And Templates. the lore is real πβ¨
βοΈ COPYRIGHT βοΈ
This is free software, distributed under the terms of the GNU General Public License (GPL). π«Ά
π AUTHOR π
Frank B. Brokken (f.b.brokken@rug.nl).
and that's the whole page bestie!! this was libbobcat-dev_6.15.01, dated 2005-2026, and you just read FBB::Iterator(3bobcat) β ty for coming to my ted talk, go write some iterators, you ate π
β¨π¦
π¦ where this page comes from
- ubuntu stonking: libbobcat-dev 6.15.01-1 Β· GPL-3.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms