Radu-Adrian Marcu / Mbed OS SOFT253_GroupA_AssignmentRepo

Dependencies:   LPS25H hts221

Fork of SOFT253_Template_Weather_OS_54 by Stage-1 Students SoCEM

Branch:
feature/listSizeLimit
Revision:
54:53ee2d07d684
Parent:
53:abb161ed4c8c
Child:
57:dfcdda1e42b6
diff -r abb161ed4c8c -r 53ee2d07d684 LinkedList.cpp
--- a/LinkedList.cpp	Thu Apr 06 19:42:34 2017 +0000
+++ b/LinkedList.cpp	Thu Apr 06 19:42:56 2017 +0000
@@ -1,7 +1,10 @@
 #include "LinkedList.h"
 #include <stdio.h>
 #include <ctype.h>
-// constructor
+/*
+    Constructor
+    Initialises a linked list using the limit given
+*/
 LinkedList::LinkedList(int limit)
 {
     sizeLimit = limit;
@@ -18,6 +21,10 @@
     
     currentSize++;              
 }
+/*
+    Adds a value to the end of the list - if the list is full, removes the 
+    oldest element first to create space
+*/
 void LinkedList::addValueEnd(Measure _measure)
 {
     if(head == NULL)