From ac55d15e484e2357954af3a6a3573c79fbbd88d8 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 12 Jul 2008 01:44:23 +0000 Subject: [FIX] Actually added the Wrapper classes (again :( ) git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@226 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokescripting/TrainerWrapper.h | 98 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 pokescripting/TrainerWrapper.h (limited to 'pokescripting/TrainerWrapper.h') diff --git a/pokescripting/TrainerWrapper.h b/pokescripting/TrainerWrapper.h new file mode 100644 index 00000000..3841bac3 --- /dev/null +++ b/pokescripting/TrainerWrapper.h @@ -0,0 +1,98 @@ +/* + * Copyright 2008 Ben Boeckel + * + * 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 . + */ + +#ifndef __POKESCRIPTING_TRAINERWRAPPER__ +#define __POKESCRIPTING_TRAINERWRAPPER__ + +// Pokemod includes +#include "ObjectWrapper.h" + +// Pokemod includes +#include "../pokemod/Trainer.h" + +namespace Pokescripting +{ +class POKESCRIPTING_EXPORT TrainerWrapper : public ObjectWrapper +{ + Q_OBJECT + + public: + TrainerWrapper(const Pokemod::Trainer* trainer, QObject* parent); + public slots: + QString name() const; + int moneyFactor() const; + QPixmap skin() const; + int teamIntel() const; + int moveIntel() const; + int itemIntel() const; + int abilityIntel() const; + int statIntel() const; + private: + TrainerWrapper& operator=(const TrainerWrapper& rhs); + + const Pokemod::Trainer* m_trainer; +}; + +inline TrainerWrapper::TrainerWrapper(const Pokemod::Trainer* trainer, QObject* parent) : + ObjectWrapper(trainer, parent), + m_trainer(trainer) +{ +} + +inline QString TrainerWrapper::TrainerWrapper::name() const +{ + return m_trainer->name(); +} + +inline int TrainerWrapper::TrainerWrapper::moneyFactor() const +{ + return m_trainer->moneyFactor(); +} + +inline QPixmap TrainerWrapper::TrainerWrapper::skin() const +{ + return m_trainer->skin(); +} + +inline int TrainerWrapper::TrainerWrapper::teamIntel() const +{ + return m_trainer->teamIntel(); +} + +inline int TrainerWrapper::TrainerWrapper::moveIntel() const +{ + return m_trainer->moveIntel(); +} + +inline int TrainerWrapper::TrainerWrapper::itemIntel() const +{ + return m_trainer->itemIntel(); +} + +inline int TrainerWrapper::TrainerWrapper::abilityIntel() const +{ + return m_trainer->abilityIntel(); +} + +inline int TrainerWrapper::TrainerWrapper::statIntel() const +{ + return m_trainer->statIntel(); +} + +} + +#endif -- cgit