diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-06-09 00:50:59 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-06-09 00:50:59 +0000 |
| commit | 60a2ed8ee8aa994c83d382af2ec477e171beb950 (patch) | |
| tree | 6fea6867adee00f22b9d775a6dce15ed875d75e6 /pokemod/Script.h | |
| parent | 0737b455ca94351c574aa1a8c83ea30c5b7bc443 (diff) | |
| download | sigen-60a2ed8ee8aa994c83d382af2ec477e171beb950.tar.gz sigen-60a2ed8ee8aa994c83d382af2ec477e171beb950.tar.xz sigen-60a2ed8ee8aa994c83d382af2ec477e171beb950.zip | |
[FIX] All modules now use their own namespace
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@201 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Script.h')
| -rw-r--r-- | pokemod/Script.h | 93 |
1 files changed, 56 insertions, 37 deletions
diff --git a/pokemod/Script.h b/pokemod/Script.h index 5e66f578..8ba96d9b 100644 --- a/pokemod/Script.h +++ b/pokemod/Script.h @@ -21,52 +21,71 @@ // Qt includes #include <QString> +namespace Pokemod +{ class Script { public: - inline Script(const QString& interpreter = "", const QString& script = "") : - m_interpreter(interpreter), - m_script(script) - { - } + Script(const QString& interpreter = "", const QString& script = ""); - inline void setInterpreter(const QString& interpreter) - { - m_interpreter = interpreter; - } - inline void setScript(const QString& script) - { - m_script = script; - } + void setInterpreter(const QString& interpreter); + inline void setScript(const QString& script); - inline QString interpreter() const - { - return m_interpreter; - } - inline QString script() const - { - return m_script; - } + inline QString interpreter() const; + inline QString script() const; - inline Script& operator=(const Script& rhs) - { - if (this == &rhs) - return *this; - m_interpreter = rhs.m_interpreter; - m_script = rhs.m_script; - return *this; - } - inline bool operator==(const Script& rhs) const - { - return ((m_interpreter == rhs.m_interpreter) && (m_script == rhs.m_script)); - } - inline bool operator!=(const Script& rhs) const - { - return !(*this == rhs); - } + inline Script& operator=(const Script& rhs); + inline bool operator==(const Script& rhs) const; + inline bool operator!=(const Script& rhs) const; private: QString m_interpreter; QString m_script; }; +inline Script::Script(const QString& interpreter, const QString& script) : + m_interpreter(interpreter), + m_script(script) +{ +} + +inline void Script::setInterpreter(const QString& interpreter) +{ + m_interpreter = interpreter; +} + +inline void Script::setScript(const QString& script) +{ + m_script = script; +} + +inline QString Script::interpreter() const +{ + return m_interpreter; +} + +inline QString Script::script() const +{ + return m_script; +} + +inline Script::Script& Script::operator=(const Script& rhs) +{ + if (this == &rhs) + return *this; + m_interpreter = rhs.m_interpreter; + m_script = rhs.m_script; + return *this; +} + +inline bool Script::operator==(const Script& rhs) const +{ + return ((m_interpreter == rhs.m_interpreter) && (m_script == rhs.m_script)); +} + +inline bool Script::operator!=(const Script& rhs) const +{ + return !(*this == rhs); +} +} + #endif |
