1 //////////////////////////////////////////////////////////////////////
2 //
3 // BeeBEEP Copyright (C) 2010-2021 Marco Mastroddi
4 //
5 // BeeBEEP is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published
7 // by the Free Software Foundation, either version 3 of the License,
8 // or (at your option) any later version.
9 //
10 // BeeBEEP is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with BeeBEEP. If not, see <http://www.gnu.org/licenses/>.
17 //
18 // Author: Marco Mastroddi <marco.mastroddi(AT)gmail.com>
19 //
20 // $Id: MessageRecord.cpp 1455 2020-12-23 10:17:53Z mastroddi $
21 //
22 //////////////////////////////////////////////////////////////////////
23 
24 #include "MessageRecord.h"
25 
26 
MessageRecord()27 MessageRecord::MessageRecord()
28  : m_toUserId( ID_INVALID ), m_chatId( ID_INVALID ), m_message()
29 {
30 }
31 
MessageRecord(const MessageRecord & mr)32 MessageRecord::MessageRecord( const MessageRecord& mr )
33 {
34   (void)operator=( mr );
35 }
36 
MessageRecord(VNumber to_user_id,VNumber chat_id,const Message & m)37 MessageRecord::MessageRecord( VNumber to_user_id, VNumber chat_id, const Message& m )
38   : m_toUserId( to_user_id ), m_chatId( chat_id ), m_message( m )
39 {
40 }
41 
operator =(const MessageRecord & mr)42 MessageRecord& MessageRecord::operator=( const MessageRecord& mr )
43 {
44   if( this != &mr )
45   {
46     m_toUserId = mr.m_toUserId;
47     m_chatId = mr.m_chatId;
48     m_message = mr.m_message;
49   }
50   return *this;
51 }
52 
53