ost::MapIndex(3)
π
ost::MapIndex β from the ost library (section 3)
okay bestie, listen up, because this one is actually so cute once you get it. π
MapIndex is the little bestie that lets you walk through a MapTable linearly, when normally the only way you could get stuff out of that table was by key. It's giving "back door but make it legal". πͺβ¨
You can increment it, check it, and dereference it just like a pointer, thanks to some very well-behaved operators. Iconic behavior honestly. π
β¨ SYNOPSIS β¨
#include <object.h>
π«Ά Public Member Functions
MapIndex ()β Creates an empty map index (pointing to nothing).MapIndex (MapObject *theObject)β Creates a map index pointing to a specific map object.MapIndex (const MapIndex &theIndex)β Creates a copy of a given map index.void * operator* () constβ Dereference operator: the pointed object it is returned asvoid *for easy re-cast.MapIndex & operator= (MapObject *theObject)β Assignment operator to avoid implicit cast.MapIndex & operator++ ()β Prefix increment operator, to be used in loops and such.MapIndex operator++ (int)β Postfix increment operator, to be used in loops and such.bool operator== (const MapIndex &theIndex) constβ Comparison operator, between two MapIndex's.bool operator!= (const MapIndex &theIndex) constbool operator== (const MapObject *theObject) constβ Comparison operator, between the MapIndex and a MapObject, useful to avoid casts for sake of clearness.bool operator!= (const MapObject *theObject) const
πΈ Detailed Description πΈ
The MapIndex allows linear access into a MapTable, that otherwise could have its elements being retrieved only by key.
It can be increased, checked and dereferenced like a pointer, by means of suitable operators. no cap, it really does move like a pointer fr fr π¦
Author
Sergio Repetto s.repetto@pentaengineering.it
Index object to access MapTable elements
π Constructor & Destructor Documentation π
ost::MapIndex::MapIndex () [inline]
Creates an empty map index (pointing to nothing). it's giving "empty vessel, no thoughts, head empty" but like, on purpose π
ost::MapIndex::MapIndex (MapObject * theObject) [inline]
Creates a map index pointing to a specific map object.
Parameters
- the indexed object
ost::MapIndex::MapIndex (const MapIndex & theIndex) [inline]
Creates a copy of a given map index.
Parameters
- the source index object
π§ Member Function Documentation π§
bool ost::MapIndex::operator!= (const MapIndex & theIndex) const [inline]
bool ost::MapIndex::operator!= (const MapObject * theObject) const [inline]
void* ost::MapIndex::operator* () const [inline]
Dereference operator: the pointed object it is returned as void * for easy re-cast.
Returns
pointer to indexed object.
MapIndex& ost::MapIndex::operator++ ()
Prefix increment operator, to be used in loops and such. your classic ++it moment, main character energy π₯
Returns
the object itself, as changed.
MapIndex ost::MapIndex::operator++ (int) [inline]
Postfix increment operator, to be used in loops and such.
Returns
the object itself, as changed.
MapIndex& ost::MapIndex::operator= (MapObject * theObject)
Assignment operator to avoid implicit cast. she does NOT do sneaky conversions, periodt π
Returns
the object itself, as changed.
bool ost::MapIndex::operator== (const MapIndex & theIndex) const [inline]
Comparison operator, between two MapIndex's.
Returns
the object itself, as changed.
bool ost::MapIndex::operator== (const MapObject * theObject) const [inline]
Comparison operator, between the MapIndex and a MapObject, useful to avoid casts for sake of clearness. like, why cast when you could just... not? π
Returns
the object itself, as changed.
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code.
okay that's the whole thing, nothing skipped, nothing invented, you're welcome bestie π«Ά
and that's a wrap!! this lil page came from GNU CommonC++, dated Sun Dec 27 2020, and it's the ost::MapIndex(3) manual page. go forth and iterate, queen. βπβ¨
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms