xref: /haiku/src/apps/haikudepot/packagemodel/UserInfo.cpp (revision 82bfaa954dcfd90582fb2c1a0e918971eea57091)
1 /*
2  * Copyright 2013-2014, Stephan Aßmus <superstippi@gmx.de>.
3  * Copyright 2013, Rene Gollent <rene@gollent.com>.
4  * Copyright 2016-2023, Andrew Lindesay <apl@lindesay.co.nz>.
5  * All rights reserved. Distributed under the terms of the MIT License.
6  */
7 
8 
9 #include "UserInfo.h"
10 
11 
12 UserInfo::UserInfo()
13 	:
14 	fNickName()
15 {
16 }
17 
18 
19 UserInfo::UserInfo(const BString& nickName)
20 	:
21 	fNickName(nickName)
22 {
23 }
24 
25 
26 UserInfo::UserInfo(const UserInfo& other)
27 	:
28 	fNickName(other.fNickName)
29 {
30 }
31 
32 
33 UserInfo&
34 UserInfo::operator=(const UserInfo& other)
35 {
36 	fNickName = other.fNickName;
37 	return *this;
38 }
39 
40 
41 bool
42 UserInfo::operator==(const UserInfo& other) const
43 {
44 	return fNickName == other.fNickName;
45 }
46 
47 
48 bool
49 UserInfo::operator!=(const UserInfo& other) const
50 {
51 	return !(*this == other);
52 }
53