ost::StackPager(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

🌸 ost::StackPager(3) β€” Library Functions Manual 🌸

okay bestie, pull up a chair, we're doing a whole manual page and it's lowkey a fun one. this is from the Library Functions Manual, it's ost::StackPager(3), and it's giving organized-teen-with-a-label-maker energy. let's GO πŸ’…


✨ NAME ✨

ost::StackPager β€” the StackPager provides a repository to stash and retrieve working data in last-in-first-out order. it's a stack, bestie. last one in is the first one out. iconic behavior honestly πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <misc.h>

Inherits ost::MemPager. yes queen, it's a mempager underneath, we'll get to why that slays in a sec ✨

🌈 Public Member Functions 🌈

  • StackPager(size_t pagesize) β€” Create a lifo pager as a mempager.
  • void * push(const void *object, size_t size) β€” Push an arbitrary object onto the stack.
  • void * push(const char *string) β€” Push a string onto the stack.
  • void * pull(void) β€” Retrieve next object from stack.
  • void purge(void) β€” Purge the stack of all objects and memory allocations.

🧚 Additional Inherited Members

(that's it, that's the section β€” the inherited goodies live over in the parent, ost::MemPager, iykyk πŸ’œ)


πŸ‘‘ Detailed Description πŸ‘‘

The StackPager provides a repository to stash and retrieve working data in last-in-first-out order. no cap.

the way that it uses a mempager to support its operation means you can store arbitrary sized objects with no fixed limit β€” which is honestly the moment, fr fr 🌟

Author

David Sugar dyfet@ostel.com

last in first out object pager. periodt. πŸ’–


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

ost::StackPager::StackPager(size_t pagesize)

Create a lifo pager as a mempager.

Parameters

  • pagesize for memory allocation

πŸ’– Member Function Documentation πŸ’–

void* ost::StackPager::pull(void)

Retrieve next object from stack.

Returns

  • object.

void ost::StackPager::purge(void)

Purge the stack of all objects and memory allocations.

bestie this one nukes everything β€” all the objects and the memory allocations. full reset, no survivors, main character energy πŸ’€

void* ost::StackPager::push(const char *string)

Push a string onto the stack.

Returns

  • stack memory location.

Parameters

  • string pointer.

void* ost::StackPager::push(const void *object, size_t size)

Push an arbitrary object onto the stack.

Returns

  • stack memory location.

Parameters

  • object pointer to data
  • size of data.

🌸 Author 🌸

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


and that's the whole vibe check, bestie β€” this page was brought to you by GNU CommonC++, dated Sun Dec 27 2020. mwah, slay, go build something cute πŸ«Άβœ¨πŸ’œ

πŸ“¦ where this page comes from