ost::LinkedSingle(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– ost::LinkedSingle πŸ’–

okay bestie, welcome to the Library Functions Manual ✨ this one's about ost::LinkedSingle(3) and it's lowkey the blueprint for every list you're gonna build, so grab a strawberry πŸ“ and let's get into it.


🌸 NAME 🌸

ost::LinkedSingle β€” a self managed single linked list object chain. yes, self managed. it does its own thing, it's independent, it's giving main character energy πŸ‘‘


✨ SYNOPSIS ✨

#include <object.h>

πŸŽ€ Public Member Functions

virtual LinkedSingle * getFirst (void)
    Get first linked object in list.
virtual LinkedSingle * getLast (void)
    Gets the last object in the list.
LinkedSingle * getNext (void)
    Get next object, for convenience.
virtual void insert (LinkedSingle &obj)
    Insert object into chain.
LinkedSingle & operator+= (LinkedSingle &obj)

πŸ¦‹ Protected Member Functions

LinkedSingle ()
virtual ~LinkedSingle ()

πŸ’œ Protected Attributes

LinkedSingle * nextObject

🌈 DETAILED DESCRIPTION 🌈

Self managed single linked list object chain. fr fr, that's the whole vibe.

So here's the tea β˜• β€” this thing is used for accumulating lists by using it as a base class for a derived subclass. you don't use it raw, you inherit from it. iykyk.

Author

  • David Sugar dyfet@gnutelephony.org

and just to say it one more time, because it slaps: Accumulating single linked list. πŸ’…


🧚 CONSTRUCTOR & DESTRUCTOR DOCUMENTATION 🧚

ost::LinkedSingle::LinkedSingle () [inline], [protected]

no notes, bestie. it exists, it's protected, it's inline. that's it.

virtual ost::LinkedSingle::~LinkedSingle () [protected], [virtual]

virtual destructor, protected, living its little life. periodt.


πŸ”₯ MEMBER FUNCTION DOCUMENTATION πŸ”₯

virtual LinkedSingle* ost::LinkedSingle::getFirst (void) [virtual]

Get first linked object in list. πŸ‘‘

okay so this one's doing a LOT. it may be dynamically recast, and it may refer to a master static bookmark pointer in a derived class. otherwise it simply returns the current object. and in a 'free' list, this may not only return the first object, but also set the first to next. so yeah β€” it can mutate stuff on you, that's not a bug, that's the design. πŸ’€

Returns

  • pointer to first object in list.

virtual LinkedSingle* ost::LinkedSingle::getLast (void) [virtual]

Gets the last object in the list. this normally follows the links to the end. it's virtual because a derived class may include a static member bookmark for the current end β€” so it's customizable, iconic behavior honestly 🌟

Returns

  • pointer to last object in list.

LinkedSingle* ost::LinkedSingle::getNext (void) [inline]

Get next object, for convenience. a derived class may use this with a dynamic cast. it's the little shortcut bestie, the grab-and-go ✨

Returns

  • next object in list.

virtual void ost::LinkedSingle::insert (LinkedSingle & obj) [virtual]

Insert object into chain. it's virtual because a derived class may choose instead to perform an insert at head or tail, may manage bookmarks, and may add mutex lock. so it's flexible, it's got range, it's whatever your subclass needs it to be πŸ’…

Parameters

  • object being inserted.

LinkedSingle& ost::LinkedSingle::operator+= (LinkedSingle & obj)

that's the whole signature, bestie. no extra doc, no commentary, just vibes. use it to add an object onto the chain with that cute little += operator 🫢


πŸ’€ MEMBER DATA DOCUMENTATION πŸ’€

LinkedSingle* ost::LinkedSingle::nextObject [protected]

the pointer that holds it all together, protected, doing the quiet work behind the scenes. the backbone of the whole chain honestly 😭


πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for GNU CommonC++ from the source code.


and that's a wrap bestie πŸŽ€ this page came to you from GNU CommonC++, dated Sun Dec 27 2020, and it was ost::LinkedSingle(3) the whole time. go build something cute with it πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from