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.
Fork of SOFT253_Template_Weather_OS_54 by
CircularArray/CircularArray.h
- Committer:
- niallfrancis
- Date:
- 2017-05-13
- Revision:
- 85:422d0a1b95cf
- Parent:
- 83:0d3572a8a851
File content as of revision 85:422d0a1b95cf:
#ifndef CIRCULARARRAY_H
#define CIRCULARARRAY_H
#include "Measure.h"
#include "MessageLogger.h"
class CircularArray
{
public:
CircularArray(int limit, MessageLogger *newLogger);
void pushValue(Measure _measure);
void readN(int n);
void readAll();
void deleteN(int n);
void deleteAll();
int getSize();
Measure pullValue();
private:
MessageLogger *logger;
int firstValue, currentSize, maxSize;
int nextSpace();
Measure *array;
};
#endif
