-
Notifications
You must be signed in to change notification settings - Fork 1
/
message.cpp
51 lines (49 loc) · 1.38 KB
/
message.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*------------------------------------------------------------------------------------------------------------------
-- Class: message.cpp
--
-- BaseClass: QObject
--
-- DATE: March 20th, 2016
--
-- REVISIONS: March 20th, 2016: Created the initial class
-- March 23rd, 2016: Integrated class with networking code
-- March 23rd, 2016: Commented
--
-- DESIGNER: Micah Willems
--
-- PROGRAMMER: Micah Willems / Carson Roscoe
--
-- METHODS: Message& Message::operator =(const Message& msg)
-- QString Message::ip() const
-- QString Message::usr() const
-- QString Message::av() const
-- QString Message::tex() const
--
-- NOTES:
-- The message class represents the information contained in a single element in a view, which includes ip address,
-- username, avatar number and text message. It has an assignment operator and four methods to access variables.
----------------------------------------------------------------------------------------------------------------------*/
#include "message.h"
Message& Message::operator =(const Message& msg) {
IP = msg.IP;
usrName = msg.usrName;
avatar = msg.avatar;
message = msg.message;
return *this;
}
QString Message::ip() const
{
return IP;
}
QString Message::usr() const
{
return usrName;
}
QString Message::av() const
{
return avatar;
}
QString Message::tex() const
{
return message;
}