GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/gui/onlineplayer.h Lines: 0 7 0.0 %
Date: 2017-11-29 Branches: 0 0 0.0 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2009-2010  Andrei Karas
4
 *  Copyright (C) 2011-2017  The ManaPlus Developers
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
            mNick(nick),
40
            mText(),
41
            mStatus(status),
42
            mLevel(level),
43
            mVersion(version),
44
            mGender(gender),
45
            mIsGM(false)
46
        {
47
        }
48
49
        A_DELETE_COPY(OnlinePlayer)
50
51
        const std::string getNick() const noexcept2 A_WARN_UNUSED
52
        { return mNick; }
53
54
        unsigned char getStaus() const noexcept2 A_WARN_UNUSED
55
        { return mStatus; }
56
57
        void setIsGM(const bool b)
58
        { mIsGM = b; }
59
60
        char getVersion() const noexcept2 A_WARN_UNUSED
61
        { return mVersion; }
62
63
        char getLevel() const noexcept2 A_WARN_UNUSED
64
        { return mLevel; }
65
66
        const std::string getText() const noexcept2 A_WARN_UNUSED
67
        { return mText; }
68
69
        void setText(std::string str);
70
71
        void setLevel(const char level) noexcept2
72
        { mLevel = level; }
73
74
    private:
75
        std::string mNick;
76
77
        std::string mText;
78
79
        unsigned char mStatus;
80
81
        signed char mLevel;
82
83
        signed char mVersion;
84
85
        GenderT mGender;
86
87
        bool mIsGM;
88
};
89
90
#endif  // GUI_ONLINEPLAYER_H