ost::Assoc(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

✨ 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