StackList Library For Arduino Author: Efstathios Chatzikyriakidis Contact: contact@efxa.org
Library was updated for Arduino 1.0
1.0 2010-09-23 - Efstathios Chatzikyriakidis - added exit(), blink(): error reporting and handling methods.
1.0 2010-09-23 - Efstathios Chatzikyriakidis - added exit(), blink(): error reporting and handling methods.
1.0 2010-09-20 - Alexander Brevig - added setPrinter(): indirectly reference a Serial object.
1.0 2010-09-15 - Efstathios Chatzikyriakidis - initial release of the library.
StackList is a library implementing a generic, dynamic stack (linked list version) for the Arduino.
It is created to help adding LIFO (Last In - First Out) Abstract Data Structure to a program for any use.
StackList library is part of the "Data Structures & Algorithms" libraries.
Download here: StackList.zip
Put the "StackList" directory in "libraries" directory.
In the Arduino IDE, create a new sketch and select from the menubar "Sketch->Import Library->StackList".
Once the library is imported, an "#include <StackList.h>" line will appear at the top of your Sketch.
Replace "T" with the data type you want to use.
StackList <T> stack;
Create instance (object) of a StackList class.
Replace "T" with the data type you want to use.
Push an item with data type "T" to the stack.
Pop an item with data type "T" from the stack.
Get an item with data type "T" from the stack.
Check if the stack is empty.
Get the number of items in the stack.
Sets the printer of the stack.
Swapping strings by using a generic, dynamic stack data structure.
StackList is a class. Therefore to use multiple stacks, you must create an instance for each of them.
Last Modified: February 11, 2012, at 10:58 AM
By: efxa