Mana
Loading...
Searching...
No Matches
units.h
Go to the documentation of this file.
1/*
2 * Support for custom units
3 * Copyright (C) 2009 The Mana World Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana 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#pragma once
23
24#include <string>
25#include "utils/xml.h"
26
27class Units
28{
29 public:
30 static void init();
31
32 static void readUnitNode(XML::Node node, const std::string &filename);
33
34 static void checkStatus();
35
39 static std::string formatCurrency(int value);
40
44 static std::string formatWeight(int value);
45};
Definition units.h:28
static std::string formatCurrency(int value)
Formats the given number in the correct currency format.
Definition units.cpp:216
static void init()
Definition units.cpp:53
static void readUnitNode(XML::Node node, const std::string &filename)
Definition units.cpp:95
static std::string formatWeight(int value)
Formats the given number in the correct weight/mass format.
Definition units.cpp:221
static void checkStatus()
Definition units.cpp:146