Marcus Lee / LinearArray

linearArray.h

Committer:
UHSLMarcus
Date:
2017-03-08
Revision:
6:314f180362cb
Parent:
5:0f65cdadb1a4
Child:
11:1e27a6f0b0cf

File content as of revision 6:314f180362cb:

#ifndef LINEAR_ARRAY_H
#define LINEAR_ARRAY_H

#include "mbed.h"

template<class type>
class LinearArray {
	public:
		LinearArray(int size, bool forced = false);
		~LinearArray();
		int push(type item);
		type& pop();
		type& peek();
		int size();
		bool empty();
		bool full();
		int count();
	private:
		type* _array;
		int _elem_count;
		int _array_size;
		int _rear;
		int _front;
		bool _forced;

};

#include "LinearArray.hpp"

#endif /* LINEAR_ARRAY_H */