summaryrefslogtreecommitdiff
path: root/tools/tmxcopy/xmlutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-02 02:57:35 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-02 02:57:35 +0200
commit3d626b2dabfb581fb40d498f65d12dbf936b2b71 (patch)
treeea33171233f4d3f9bf76b765f65fe99c82057e52 /tools/tmxcopy/xmlutils.cpp
parent954ceb91ddd94985594996d6d3c50be7b5652626 (diff)
downloadplus-3d626b2dabfb581fb40d498f65d12dbf936b2b71.tar.gz
plus-3d626b2dabfb581fb40d498f65d12dbf936b2b71.tar.bz2
plus-3d626b2dabfb581fb40d498f65d12dbf936b2b71.tar.xz
plus-3d626b2dabfb581fb40d498f65d12dbf936b2b71.zip
Remove tools from client.
Tools moved to evol-tools repository. http://www.gitorious.org/evol/evol-tools
Diffstat (limited to 'tools/tmxcopy/xmlutils.cpp')
-rw-r--r--tools/tmxcopy/xmlutils.cpp75
1 files changed, 0 insertions, 75 deletions
diff --git a/tools/tmxcopy/xmlutils.cpp b/tools/tmxcopy/xmlutils.cpp
deleted file mode 100644
index a4984a6a2..000000000
--- a/tools/tmxcopy/xmlutils.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * The Mana Client
- * Copyright (C) 2004-2009 The Mana World Development Team
- * Copyright (C) 2009-2010 The Mana Developers
- *
- * This file is part of The Mana Client.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "xmlutils.h"
-
-namespace XML
-{
- int
- getProperty(xmlNodePtr node, const char* name, int def)
- {
- int &ret = def;
-
- xmlChar *prop = xmlGetProp(node, BAD_CAST name);
- if (prop) {
- ret = atoi((char*)prop);
- xmlFree(prop);
- }
-
- return ret;
- }
-
- double
- getFloatProperty(xmlNodePtr node, const char* name, double def)
- {
- double &ret = def;
-
- xmlChar *prop = xmlGetProp(node, BAD_CAST name);
- if (prop) {
- ret = atof((char*)prop);
- xmlFree(prop);
- }
-
- return ret;
- }
-
- std::string
- getProperty(xmlNodePtr node, const char *name, const std::string &def)
- {
- xmlChar *prop = xmlGetProp(node, BAD_CAST name);
- if (prop) {
- std::string val = (char*)prop;
- xmlFree(prop);
- return val;
- }
-
- return def;
- }
-
- xmlNodePtr findFirstChildByName(xmlNodePtr parent, const char *name)
- {
- for_each_xml_child_node(child, parent)
- if (xmlStrEqual(child->name, BAD_CAST name))
- return child;
-
- return NULL;
- }
-}