ost::Assoc(3)
β¨ NAME β¨
ost::Assoc β bestie, this class is literally here to associate (object) pointers with named strings π that's the whole vibe, no cap.
πΈ SYNOPSIS πΈ
#include <misc.h>
π Public Member Functions
void * getPointer (const char *id) const
void setPointer (const char *id, void *data)
π¦ Protected Member Functions
Assoc ()
virtual ~Assoc ()
void clear (void)
virtual void * getMemory (size_t size)=0
π Detailed Description π
okay so, this class is used to associate (object) pointers with named strings β¨ like, you give it a name, it gives you back a pointer, iconic behavior honestly.
A virtual is used to allocate memory which can be overriden in the derived class. so yes you can override it, and yes that is very much on purpose π«Ά
Author
David Sugar dyfet@ostel.com</purl>
associate names with pointers. periodt π
π Constructor & Destructor Documentation π
ost::Assoc::Assoc ()β [protected] the constructor, lowkey shy, only your own derived classes get to call her πvirtual ost::Assoc::~Assoc ()β [protected], [virtual] and she's virtual too, so she cleans up properly when the derived class says bye π
β Member Function Documentation β
void ost::Assoc::clear (void)β [protected] wipes the slate clean, protected energy only π§Όvirtual void* ost::Assoc::getMemory (size_t size)β [protected], [pure virtual] ngl this one is pure virtual, which means you HAVE to implement it in your derived class or nothing compiles. no default, no shortcuts, main character responsibility fr fr πvoid* ost::Assoc::getPointer (const char * id) constβ hand it the id, get the pointer back πvoid ost::Assoc::setPointer (const char * id, void * data)β hand it an id and some data and she'll remember them together, obsessed π
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code. (the robots wrote this one, we just gave it a glow-up β¨)
that's the whole page bestie, slay π«Άπ
πΈ and before you go: this lil' manual is GNU CommonC++, dated Sun Dec 27 2020, filed under ost::Assoc(3) β so when you cite her, cite her right, iykyk π
π¦ 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