ManaPlus
modinfo.h
Go to the documentation of this file.
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 
31 {
32  public:
33  ModInfo();
34 
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
const std::string & getLocalDir() const
Definition: modinfo.h:58
std::string mName
Definition: modinfo.h:62
std::string mDescription
Definition: modinfo.h:63
const std::string & getDescription() const
Definition: modinfo.h:46
const std::string & getHelp() const
Definition: modinfo.h:52
std::string mHelp
Definition: modinfo.h:64
void setDescription(const std::string &text)
Definition: modinfo.h:43
void setLocalDir(const std::string &text)
Definition: modinfo.h:55
void setName(const std::string &name)
Definition: modinfo.h:37
const std::string & getName() const
Definition: modinfo.h:40
void setHelp(const std::string &text)
Definition: modinfo.h:49
ModInfo()
Definition: modinfo.cpp:28
std::string mLocalDir
Definition: modinfo.h:65
#define A_WARN_UNUSED
Definition: localconsts.h:161
#define noexcept2
Definition: localconsts.h:50
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53
ModInfos::const_iterator ModInfoCIterator
Definition: modinfo.h:70
std::map< std::string, ModInfo * > ModInfos
Definition: modinfo.h:68
ModInfos::iterator ModInfoIterator
Definition: modinfo.h:69