ost::LinkedDouble(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– ost::LinkedDouble(3) πŸ’–

okay bestie, gather round β€” this is a page from the GNU CommonC++ Library Functions Manual, and it's all about ost::LinkedDouble, the self-managed double linked list object chain. Yes, the name is a mouthful. No, we're not skipping anything. Let's go 🫢


✨ NAME ✨

ost::LinkedDouble β€” a self managed double linked list object chain. that's it, that's the vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <object.h>

🌸 Public Types 🌸

  • enum InsertMode { modeAtFirst, modeAtLast, modeBefore, modeAfter } β€” you pass this into the overloaded insert() method to tell it how to insert data into the list. it's giving "choose your own adventure" energy ✨

🌈 Public Member Functions 🌈

  • virtual LinkedDouble * getFirst (void) β€” get first linked object in list.
  • virtual LinkedDouble * getLast (void) β€” gets the last object in the list.
  • virtual LinkedDouble * getInsert (void) β€” virtual, so it can get the insert point to use when adding new members.
  • LinkedDouble * getNext (void) β€” get next object, for convenience. (they said convenience, we said slay)
  • LinkedDouble * getPrev (void) β€” get prev object in the list.
  • virtual void insert (LinkedDouble &obj, InsertMode position=modeAtLast) β€” insert object into chain at given position, as indicated by InsertMode; if no position is given, it defaults to modeAtLast, inserting the element at the list's end.
  • virtual void detach (void) β€” remove object from chain. bye bestie πŸ‘‹
  • LinkedDouble & operator+= (LinkedDouble &obj)
  • LinkedDouble & operator-- ()

πŸŽ€ Protected Member Functions πŸŽ€

  • LinkedDouble ()
  • virtual ~LinkedDouble ()
  • virtual void enterLock (void)
  • virtual void leaveLock (void)
  • virtual LinkedDouble * firstObject ()
  • virtual LinkedDouble * lastObject ()

⭐ Protected Attributes ⭐

  • LinkedDouble * nextObject
  • LinkedDouble * prevObject

πŸ’œ Detailed Description πŸ’œ

Self managed double linked list object chain.

This is used for accumulating lists by using as a base class for a derived subclass. so like, you inherit from it and it just… handles the list for you. iconic behavior, no cap πŸ‘‘

Author

David Sugar dyfet@gnutelephony.org

Accumulating double linked list. πŸ’«


🧚 Member Enumeration Documentation 🧚

🌟 enum ost::LinkedDouble::InsertMode 🌟

Requested in the overloaded insert() method to indicate how to insert data into list.

Enumerator

  • modeAtFirst β€” insert at first position in list pointed by current object
  • modeAtLast β€” insert at last position in list pointed by current object
  • modeBefore β€” insert in list before current object
  • modeAfter β€” insert in list after current object
four modes, zero ambiguity. pick one and commit, bestie πŸ’…

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

  • ost::LinkedDouble::LinkedDouble () [inline], [protected]
  • virtual ost::LinkedDouble::~LinkedDouble () [protected], [virtual]

that's it. that's the whole section. short and sweet, we love a minimal queen πŸ™ˆ


πŸ”₯ Member Function Documentation πŸ”₯

  • virtual void ost::LinkedDouble::detach (void) [virtual] β€” remove object from chain.
  • virtual void ost::LinkedDouble::enterLock (void) [protected], [virtual]
  • virtual LinkedDouble* ost::LinkedDouble::firstObject () [protected], [virtual]
  • virtual LinkedDouble* ost::LinkedDouble::getFirst (void) [virtual] β€” get first linked object in list. this may be dynamically recast, and may refer to a master static bookmark pointer in a derived class. otherwise it follows list to front.

Returns β€” pointer to first object in list.

  • virtual LinkedDouble* ost::LinkedDouble::getInsert (void) [virtual] β€” virtual to get the insert point to use when adding new members. this may be current, or always head or always tail. as a virtual, this allows the derived class to establish 'policy'. (policy?? in MY linked list?? more likely than you think ✨)

Returns β€” pointer to insertion point in list.

  • virtual LinkedDouble* ost::LinkedDouble::getLast (void) [virtual] β€” gets the last object in the list. this normally follows the links to the end. this is a virtual because the derived class may include a static member bookmark for the current end.

Returns β€” pointer to last object in list.

  • LinkedDouble* ost::LinkedDouble::getNext (void) [inline] β€” get next object, for convenience. derived class may use this with a dynamic cast.

Returns β€” next object in list.

  • LinkedDouble* ost::LinkedDouble::getPrev (void) [inline] β€” get prev object in the list.

Returns β€” pointer to previous object.

  • virtual void ost::LinkedDouble::insert (LinkedDouble & obj, InsertMode position = modeAtLast) [virtual] β€” insert object into chain at given position, as indicated by InsertMode; if no position is given, it defaults to modeAtLast, inserting element at list's end.

Parameters

  • object being inserted.
  • position where object is inserted.
  • virtual LinkedDouble* ost::LinkedDouble::lastObject () [protected], [virtual]
  • virtual void ost::LinkedDouble::leaveLock (void) [protected], [virtual]
  • LinkedDouble& ost::LinkedDouble::operator+= (LinkedDouble & obj)
  • LinkedDouble& ost::LinkedDouble::operator-- ()

🌈 Member Data Documentation 🌈

  • LinkedDouble* ost::LinkedDouble::nextObject [protected]
  • LinkedDouble * ost::LinkedDouble::prevObject [protected]

two pointers, one mission: keep the chain linked, bestie πŸ”—


πŸ’« Author πŸ’«

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


and that's the whole page, bestie!! this little cutie was brought to you by GNU CommonC++ and dated Sun Dec 27 2020 β€” so like, it's vintage but still serving πŸ’– thank you for coming to my TED talk, go build a linked list, periodt πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from