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 Coursework by
Queue.h@43:4ddc392dd0cc, 2017-05-04 (annotated)
- Committer:
- pburtenshaw
- Date:
- Thu May 04 12:55:16 2017 +0000
- Revision:
- 43:4ddc392dd0cc
- Parent:
- 42:4e0a96b52e65
queue updatd but many errors - suspected missing colon or bracket?
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pburtenshaw | 42:4e0a96b52e65 | 1 | #ifndef Queue_H |
pburtenshaw | 42:4e0a96b52e65 | 2 | #define Queue_H |
pburtenshaw | 42:4e0a96b52e65 | 3 | #include "Reading.h" |
pburtenshaw | 42:4e0a96b52e65 | 4 | |
pburtenshaw | 42:4e0a96b52e65 | 5 | class Queue{ |
pburtenshaw | 43:4ddc392dd0cc | 6 | //variables |
pburtenshaw | 43:4ddc392dd0cc | 7 | public: |
pburtenshaw | 42:4e0a96b52e65 | 8 | const int maxSize = 120; |
pburtenshaw | 42:4e0a96b52e65 | 9 | int front; |
pburtenshaw | 42:4e0a96b52e65 | 10 | int back; |
pburtenshaw | 42:4e0a96b52e65 | 11 | int count; |
pburtenshaw | 43:4ddc392dd0cc | 12 | bool isFull; |
pburtenshaw | 43:4ddc392dd0cc | 13 | Reading *storage; |
pburtenshaw | 42:4e0a96b52e65 | 14 | |
pburtenshaw | 42:4e0a96b52e65 | 15 | |
pburtenshaw | 42:4e0a96b52e65 | 16 | //realisticly what we need:: |
pburtenshaw | 42:4e0a96b52e65 | 17 | //read values taking argument n |
pburtenshaw | 42:4e0a96b52e65 | 18 | //read values taking no argument |
pburtenshaw | 42:4e0a96b52e65 | 19 | //take value and put it in the right place |
pburtenshaw | 42:4e0a96b52e65 | 20 | //delete with argument |
pburtenshaw | 42:4e0a96b52e65 | 21 | //delete without argument |
pburtenshaw | 43:4ddc392dd0cc | 22 | |
pburtenshaw | 43:4ddc392dd0cc | 23 | Queue(int i); |
pburtenshaw | 42:4e0a96b52e65 | 24 | Queue(); |
pburtenshaw | 43:4ddc392dd0cc | 25 | void push(Reading r); |
pburtenshaw | 42:4e0a96b52e65 | 26 | void read(int nR); // where nR is the number to read, if REAL ALL is typed then the method will be called by something like queue.read(queue.count). |
pburtenshaw | 42:4e0a96b52e65 | 27 | void deleteRecords(int nD); //as above but nD is number to delete |
pburtenshaw | 43:4ddc392dd0cc | 28 | |
pburtenshaw | 42:4e0a96b52e65 | 29 | }; |
pburtenshaw | 42:4e0a96b52e65 | 30 | #endif |