Dynamic stack classes...
Here we present a couple of small Purebasic source code utilities for implementing dynamic stacks which are embeddable in the sense that you can easily embed these stacks within structures, linked lists, hash tables, other stacks and so on.
The first of these utilities exposes two OOP classes; one which implements a 'basic' stack class and one which implements a 'structured' stack class (one whose elements can consist of an entire structure).
The second of these utilities provides for simple integer stacks only, and has been streamlined accordingly. This is the one to use if your application requires integer stacks only.
Main features of the stack classes:
- Fully open source and fully cross-platform
- Completely thread-safe (with the usual provisions regarding shared resources of course)
- Suitable for use in 32-bit and 64-bit applications
- Completely embeddable; embed stacks inside other stacks or objects or structures or... etc.
- Full memory management in the case of 'structured stacks' containing string fields
- Methods for dynamically resizing stacks etc.
The downloads include all of the source-code and some accompanying
demo programs. The integer stack class utility has no user-manual
since it shares all of the same methods (and indeed the same code -
just streamlined) as the more comprehensive stack utility which does
come with a user manual in pdf format.
Enjoy!