ManaPlus
statdb.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2016-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_DB_STATDB_H
23 #define RESOURCES_DB_STATDB_H
24 
26 
27 #include "utils/vector.h"
28 
29 #include "resources/basicstat.h"
30 
31 #include "localconsts.h"
32 
33 namespace StatDb
34 {
35  void load();
36 
37  void unload();
38 
39  void loadXmlFile(const std::string &fileName,
40  const SkipError skipError);
41 
42  void addDefaultStats();
43 
44  const STD_VECTOR<BasicStat> &getBasicStats();
45 
46  const STD_VECTOR<BasicStat> &getStats(const std::string &page);
47 
48  const STD_VECTOR<std::string> &getPages();
49 } // namespace StatDb
50 
51 #endif // RESOURCES_DB_STATDB_H
Definition: statdb.h:34
const std::vector< BasicStat > & getBasicStats()
Definition: statdb.cpp:72
void load()
Definition: statdb.cpp:87
void addDefaultStats()
Definition: statdb.cpp:44
void unload()
Definition: statdb.cpp:228
const std::vector< BasicStat > & getStats(const std::string &page)
Definition: statdb.cpp:77
const std::vector< std::string > & getPages()
Definition: statdb.cpp:82
void loadXmlFile(const std::string &fileName, const SkipError skipError)
Definition: statdb.cpp:171
bool SkipError
Definition: skiperror.h:30
std::string fileName
Definition: testmain.cpp:39