1 |
|
|
/* |
2 |
|
|
* The ManaPlus Client |
3 |
|
|
* Copyright (C) 2011-2019 The ManaPlus Developers |
4 |
|
|
* Copyright (C) 2019-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 RESOURCES_MODINFO_H |
23 |
|
|
#define RESOURCES_MODINFO_H |
24 |
|
|
|
25 |
|
|
#include <map> |
26 |
|
|
#include <string> |
27 |
|
|
|
28 |
|
|
#include "localconsts.h" |
29 |
|
|
|
30 |
|
|
class ModInfo final |
31 |
|
|
{ |
32 |
|
|
public: |
33 |
|
|
ModInfo(); |
34 |
|
|
|
35 |
|
|
A_DELETE_COPY(ModInfo) |
36 |
|
|
|
37 |
|
|
void setName(const std::string &name) noexcept2 |
38 |
|
|
{ mName = name; } |
39 |
|
|
|
40 |
|
|
const std::string &getName() const noexcept2 A_WARN_UNUSED |
41 |
|
|
{ return mName; } |
42 |
|
|
|
43 |
|
|
void setDescription(const std::string &text) noexcept2 |
44 |
|
|
{ mDescription = text; } |
45 |
|
|
|
46 |
|
|
const std::string &getDescription() const noexcept2 A_WARN_UNUSED |
47 |
|
|
{ return mDescription; } |
48 |
|
|
|
49 |
|
|
void setHelp(const std::string &text) noexcept2 |
50 |
|
|
{ mHelp = text; } |
51 |
|
|
|
52 |
|
|
const std::string &getHelp() const noexcept2 A_WARN_UNUSED |
53 |
|
|
{ return mHelp; } |
54 |
|
|
|
55 |
|
|
void setLocalDir(const std::string &text) |
56 |
|
|
{ mLocalDir = text; } |
57 |
|
|
|
58 |
|
|
const std::string &getLocalDir() const noexcept2 A_WARN_UNUSED |
59 |
|
|
{ return mLocalDir; } |
60 |
|
|
|
61 |
|
|
private: |
62 |
|
|
std::string mName; |
63 |
|
|
std::string mDescription; |
64 |
|
|
std::string mHelp; |
65 |
|
|
std::string mLocalDir; |
66 |
|
|
}; |
67 |
|
|
|
68 |
|
|
typedef std::map<std::string, ModInfo*> ModInfos; |
69 |
|
|
typedef ModInfos::iterator ModInfoIterator; |
70 |
|
|
typedef ModInfos::const_iterator ModInfoCIterator; |
71 |
|
|
|
72 |
|
|
#endif // RESOURCES_MODINFO_H |