ManaPlus
src
gui
onlineplayer.h
Go to the documentation of this file.
1
/*
2
* The ManaPlus Client
3
* Copyright (C) 2011-2019 The ManaPlus Developers
4
* Copyright (C) 2009-2021 Andrei Karas
5
*
6
* This file is part of The ManaPlus Client.
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
22
#ifndef GUI_ONLINEPLAYER_H
23
#define GUI_ONLINEPLAYER_H
24
25
#include "
enums/being/gender.h
"
26
27
#include <string>
28
29
#include "
localconsts.h
"
30
31
class
OnlinePlayer
final
32
{
33
public
:
34
OnlinePlayer
(
const
std::string &nick,
35
const
unsigned
char
status,
36
const
signed
char
level,
37
const
GenderT
gender,
38
const
signed
char
version,
39
const
int
group) :
40
mNick
(nick),
41
mText
(),
42
mGroup
(group),
43
mStatus
(status),
44
mLevel
(level),
45
mVersion
(version),
46
mGender
(gender),
47
mIsGM
(false)
48
{
49
}
50
51
A_DELETE_COPY
(
OnlinePlayer
)
52
53
const
std
::
string
getNick
() const
noexcept2
A_WARN_UNUSED
54
{
return
mNick
; }
55
56
unsigned
char
getStaus
() const
noexcept2
A_WARN_UNUSED
57
{
return
mStatus
; }
58
59
void
setIsGM
(
const
bool
b)
60
{
mIsGM
= b; }
61
62
char
getVersion
() const
noexcept2
A_WARN_UNUSED
63
{
return
mVersion
; }
64
65
char
getLevel
() const
noexcept2
A_WARN_UNUSED
66
{
return
mLevel
; }
67
68
const
std::string
getText
() const
noexcept2
A_WARN_UNUSED
69
{
return
mText
; }
70
71
void
setText
(std::string str);
72
73
void
setLevel
(
const
char
level)
noexcept2
74
{
mLevel
= level; }
75
76
private
:
77
std::string
mNick
;
78
79
std::string
mText
;
80
81
int
mGroup
;
82
83
unsigned
char
mStatus
;
84
85
signed
char
mLevel
;
86
87
signed
char
mVersion
;
88
89
GenderT
mGender
;
90
91
bool
mIsGM
;
92
};
93
94
#endif
// GUI_ONLINEPLAYER_H
OnlinePlayer
Definition:
onlineplayer.h:32
OnlinePlayer::getNick
const std::string getNick() const
Definition:
onlineplayer.h:53
OnlinePlayer::setIsGM
void setIsGM(const bool b)
Definition:
onlineplayer.h:59
OnlinePlayer::OnlinePlayer
OnlinePlayer(const std::string &nick, const unsigned char status, const signed char level, const GenderT gender, const signed char version, const int group)
Definition:
onlineplayer.h:34
OnlinePlayer::mText
std::string mText
Definition:
onlineplayer.h:79
OnlinePlayer::getLevel
char getLevel() const
Definition:
onlineplayer.h:65
OnlinePlayer::setText
void setText(std::string str)
Definition:
whoisonline.cpp:860
OnlinePlayer::getText
const std::string getText() const
Definition:
onlineplayer.h:68
OnlinePlayer::mNick
std::string mNick
Definition:
onlineplayer.h:77
OnlinePlayer::mIsGM
bool mIsGM
Definition:
onlineplayer.h:91
OnlinePlayer::mStatus
unsigned char mStatus
Definition:
onlineplayer.h:83
OnlinePlayer::getVersion
char getVersion() const
Definition:
onlineplayer.h:62
OnlinePlayer::mLevel
signed char mLevel
Definition:
onlineplayer.h:85
OnlinePlayer::mVersion
signed char mVersion
Definition:
onlineplayer.h:87
OnlinePlayer::mGroup
int mGroup
Definition:
onlineplayer.h:81
OnlinePlayer::setLevel
void setLevel(const char level)
Definition:
onlineplayer.h:73
OnlinePlayer::getStaus
unsigned char getStaus() const
Definition:
onlineplayer.h:56
OnlinePlayer::mGender
GenderT mGender
Definition:
onlineplayer.h:89
gender.h
GenderT
Gender ::T GenderT
Definition:
gender.h:35
localconsts.h
A_WARN_UNUSED
#define A_WARN_UNUSED
Definition:
localconsts.h:161
noexcept2
#define noexcept2
Definition:
localconsts.h:50
final
#define final
Definition:
localconsts.h:46
A_DELETE_COPY
#define A_DELETE_COPY(func)
Definition:
localconsts.h:53
std
Definition:
mseprimitives.h:398
Generated on Wed Mar 17 2021 19:19:06 for ManaPlus by
1.9.1