Main Page | Class List | File List | Class Members

LRU_STACK Class Reference

A stack-like structure which always has the least recently used item at the bottom, and the most recently used at the top. More...

#include <LRU_STACK.hpp>

List of all members.

Public Member Functions

 LRU_STACK (unsigned long int _k)
 Base constructor.
 ~LRU_STACK ()
 Base deconstructor.
bool exists (unsigned long int &toCheck)
 Check if supplied value is already stored.
bool remove (unsigned long int &toRemove)
 Remove an element from the stack (prints a warning if not found).
void push (unsigned long int &toPush)
 Puts an element on top of the stack.
void clear ()
 Clear all entries.

Protected Attributes

unsigned long int * data
 Internal array used for datastructure (TODO: swap with singly linked list).
unsigned long int start_index
 Start of stack in array.
unsigned long int k
 Length of _data array.


Detailed Description

A stack-like structure which always has the least recently used item at the bottom, and the most recently used at the top.


The documentation for this class was generated from the following files:
Generated on Fri Aug 15 18:12:25 2008 for Run-timeCacheSimulator by  doxygen 1.3.9.1