3rd Repo, trying to figure this out.
Fork of SOFT253_Template_Weather_OS_54 by
Message/Message.cpp@85:422d0a1b95cf, 2017-05-13 (annotated)
- Committer:
- niallfrancis
- Date:
- Sat May 13 17:35:58 2017 +0000
- Revision:
- 85:422d0a1b95cf
- Parent:
- 83:0d3572a8a851
Finished commenting classes;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aburch1 | 81:996c0a3319b4 | 1 | #include "Message.h" |
aburch1 | 81:996c0a3319b4 | 2 | |
aburch1 | 83:0d3572a8a851 | 3 | /** |
niallfrancis | 85:422d0a1b95cf | 4 | @file : Message.cpp |
niallfrancis | 85:422d0a1b95cf | 5 | @authors : Radu Marcu, Jacob Williams, Niall Francis, Arron Burch |
niallfrancis | 85:422d0a1b95cf | 6 | |
niallfrancis | 85:422d0a1b95cf | 7 | @section DESCRIPTION |
niallfrancis | 85:422d0a1b95cf | 8 | |
niallfrancis | 85:422d0a1b95cf | 9 | This is the Message class, which is used by the MessageLogger to pass messages into the mail box |
niallfrancis | 85:422d0a1b95cf | 10 | awaiting printing by the logger. The Message class is also used by the MessageLogger to get the |
niallfrancis | 85:422d0a1b95cf | 11 | contents of the mail box back out to be printed. |
niallfrancis | 85:422d0a1b95cf | 12 | */ |
niallfrancis | 85:422d0a1b95cf | 13 | |
niallfrancis | 85:422d0a1b95cf | 14 | |
niallfrancis | 85:422d0a1b95cf | 15 | /** |
aburch1 | 83:0d3572a8a851 | 16 | Copies the content from ptr into the Message object text char array. |
aburch1 | 83:0d3572a8a851 | 17 | |
aburch1 | 83:0d3572a8a851 | 18 | @param ptr : Pointer to char array containing message. |
aburch1 | 83:0d3572a8a851 | 19 | */ |
aburch1 | 81:996c0a3319b4 | 20 | void Message::copy(char* ptr) |
aburch1 | 81:996c0a3319b4 | 21 | { |
aburch1 | 81:996c0a3319b4 | 22 | strncpy(text, ptr, 256); |
aburch1 | 81:996c0a3319b4 | 23 | } |
aburch1 | 83:0d3572a8a851 | 24 | |
aburch1 | 83:0d3572a8a851 | 25 | /** |
aburch1 | 83:0d3572a8a851 | 26 | @return text : Returns the text char array stored in Message object. |
aburch1 | 83:0d3572a8a851 | 27 | */ |
aburch1 | 81:996c0a3319b4 | 28 | char* Message::getText() |
aburch1 | 81:996c0a3319b4 | 29 | { |
aburch1 | 81:996c0a3319b4 | 30 | return text; |
aburch1 | 81:996c0a3319b4 | 31 | } |