summaryrefslogtreecommitdiffstats
path: root/pokemod/Object.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-04-15 18:57:00 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-04-15 18:57:00 +0000
commite1b5d7bc705810ac15ed36924617af52abdc8e81 (patch)
tree0dae5af4e2737372ec479bb9ccdd2201edf684a8 /pokemod/Object.cpp
parent12d5161318a4d8d781f896812f5a95fa7b46d8a8 (diff)
downloadsigen-e1b5d7bc705810ac15ed36924617af52abdc8e81.tar.gz
sigen-e1b5d7bc705810ac15ed36924617af52abdc8e81.tar.xz
sigen-e1b5d7bc705810ac15ed36924617af52abdc8e81.zip
[FIX] Object::mid -> m_id
[FIX] XML is now used [FIX] Images are stored in the XML file and classes rather than relying on external images [FIX] Frac no longer keeps track of its type; the class should do it [ADD] pokemod/Object.cpp git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@97 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Object.cpp')
-rw-r--r--pokemod/Object.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/pokemod/Object.cpp b/pokemod/Object.cpp
new file mode 100644
index 00000000..2460b072
--- /dev/null
+++ b/pokemod/Object.cpp
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
+ *
+ * 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 3 of the License, or
+ * (at your option) 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/>.
+ */
+
+// Pokemod includes
+#include "Pokemod.h"
+
+// Header include
+#include "Object.h"
+
+template<class T> void Object::warning(const QString& msg) const throw(Exception)
+{
+ throw(T(m_className, msg));
+}
+
+template<class T> void Object::error(const QString& msg) const throw(Exception)
+{
+ m_valid = false;
+ warning<T>(msg);
+}