Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
linearArray.h
- Committer:
- UHSLMarcus
- Date:
- 2017-03-01
- Revision:
- 3:8e9f85814809
- Parent:
- 2:92576523c23e
- Child:
- 4:7743528fb9e5
File content as of revision 3:8e9f85814809:
#ifndef LINEAR_ARRAY_H
#define LINEAR_ARRAY_H
#include "mbed.h"
template <class type>
class LinearArray {
public:
LinearArray(int size);
~LinearArray();
int push(type item);
type pop(int index = 0);
type& peek(int index = 0);
int size();
int elements();
bool hasSpace();
bool empty();
private:
type* array;
int elem_count;
int array_size;
int elem_decrease();
int elem_increase();
};
#include "linearArray.hpp"
#endif /* LINEAR_ARRAY_H */