summaryrefslogtreecommitdiffstats
path: root/pokemod/Author.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-09-05 20:41:05 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-09-05 20:41:05 +0000
commitb81f5bffa2772eb9bd3c67fb35485ab1ee2d96e7 (patch)
tree6609f31b1635d948cf7a216c7fea72cfb3c905a0 /pokemod/Author.cpp
parentb99ffef4aa68dd5f0af64de9aec0f610e267d8cc (diff)
downloadsigen-b81f5bffa2772eb9bd3c67fb35485ab1ee2d96e7.tar.gz
sigen-b81f5bffa2772eb9bd3c67fb35485ab1ee2d96e7.tar.xz
sigen-b81f5bffa2772eb9bd3c67fb35485ab1ee2d96e7.zip
[FIX] Moving stuff for the move to the new name, Sigma Game Engine (sigen for short)
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@249 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Author.cpp')
-rw-r--r--pokemod/Author.cpp124
1 files changed, 0 insertions, 124 deletions
diff --git a/pokemod/Author.cpp b/pokemod/Author.cpp
deleted file mode 100644
index f5def288..00000000
--- a/pokemod/Author.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2007-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/>.
- */
-
-// Header include
-#include "Author.h"
-
-// Pokemod includes
-#include "Macros.h"
-#include "Pokemod.h"
-
-// Qt includes
-#include <QtCore/QRegExp>
-
-Pokemod::Author::Author(const Author& author) :
- Object(author.parent(), author.id())
-{
- *this = author;
-}
-
-Pokemod::Author::Author(const Pokemod* parent, const int id) :
- Object(parent, id),
- m_name(""),
- m_email(""),
- m_role("")
-{
-}
-
-Pokemod::Author::Author(const Author& author, const Pokemod* parent, const int id) :
- Object(parent, id)
-{
- *this = author;
-}
-
-Pokemod::Author::Author(const QDomElement& xml, const Pokemod* parent, const int id) :
- Object(parent, id)
-{
- LOAD_ID();
- load(xml);
-}
-
-void Pokemod::Author::validate()
-{
- TEST_BEGIN();
- if (m_name.isEmpty())
- emit(error("Name is empty"));
- if (m_email.isEmpty())
- emit(warning("Email is empty"));
- else if (!QRegExp("[a-zA-Z0-9%-_\\.]+@[a-zA-Z0-9\\-]+(\\.[a-zA-Z]+)*\\.[a-zA-Z]{2,4}").exactMatch(m_email))
- emit(error("Email is invalid"));
- if (m_role.isEmpty())
- emit(error("Role is empty"));
- TEST_END();
-}
-
-void Pokemod::Author::load(const QDomElement& xml)
-{
- LOAD_BEGIN();
- LOAD(name);
- LOAD(email);
- LOAD(role);
-}
-
-QDomElement Pokemod::Author::save() const
-{
- SAVE_CREATE();
- SAVE(name);
- SAVE(email);
- SAVE(role);
- return xml;
-}
-
-void Pokemod::Author::setName(const QString& name)
-{
- CHECK(name);
-}
-
-void Pokemod::Author::setEmail(const QString& email)
-{
- CHECK(email);
-}
-
-void Pokemod::Author::setRole(const QString& role)
-{
- CHECK(role);
-}
-
-QString Pokemod::Author::name() const
-{
- return m_name;
-}
-
-QString Pokemod::Author::email() const
-{
- return m_email;
-}
-
-QString Pokemod::Author::role() const
-{
- return m_role;
-}
-
-Pokemod::Author& Pokemod::Author::operator=(const Author& rhs)
-{
- if (this == &rhs)
- return *this;
- COPY(name);
- COPY(email);
- COPY(role);
- return *this;
-}