3rd Repo, trying to figure this out.

Dependencies:   LPS25H hts221

Fork of SOFT253_Template_Weather_OS_54 by Stage-1 Students SoCEM

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