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/RulesWrapper.h | 188 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 pokescripting/RulesWrapper.h (limited to 'pokescripting/RulesWrapper.h') diff --git a/pokescripting/RulesWrapper.h b/pokescripting/RulesWrapper.h new file mode 100644 index 00000000..fc816306 --- /dev/null +++ b/pokescripting/RulesWrapper.h @@ -0,0 +1,188 @@ +/* + * 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_RULESWRAPPER__ +#define __POKESCRIPTING_RULESWRAPPER__ + +// Pokescripting includes +#include "ObjectWrapper.h" + +// Pokemod includes +#include "../pokemod/Rules.h" + +namespace Pokescripting +{ +class POKESCRIPTING_EXPORT RulesWrapper : public ObjectWrapper +{ + Q_OBJECT + + public: + RulesWrapper(const Pokemod::Rules* rules, QObject* parent); + public slots: + bool genderAllowed() const; + bool breedingAllowed() const; + bool criticalDomains() const; + bool useTurns() const; + int numBoxes() const; + int boxSize() const; + int maxParty() const; + int maxFight() const; + int maxPlayers() const; + int maxHeldItems() const; + int maxAbilities() const; + int maxNatures() const; + int maxMoves() const; + int maxLevel() const; + int maxStages() const; + int maxMoney() const; + bool hardCash() const; + bool allowSwitchStyle() const; + bool specialSplit() const; + bool specialDVSplit() const; + bool effortValuesAllowed() const; + int maxTotalEV() const; + int maxEVPerStat() const; + private: + RulesWrapper& operator=(const RulesWrapper& rhs); + + const Pokemod::Rules* m_rules; +}; + +inline RulesWrapper::RulesWrapper(const Pokemod::Rules* rules, QObject* parent) : + ObjectWrapper(rules, parent), + m_rules(rules) +{ +} + +inline bool RulesWrapper::genderAllowed() const +{ + return m_rules->genderAllowed(); +} + +inline bool RulesWrapper::breedingAllowed() const +{ + return m_rules->breedingAllowed(); +} + +inline bool RulesWrapper::criticalDomains() const +{ + return m_rules->criticalDomains(); +} + +inline bool RulesWrapper::useTurns() const +{ + return m_rules->useTurns(); +} + +inline int RulesWrapper::numBoxes() const +{ + return m_rules->numBoxes(); +} + +inline int RulesWrapper::boxSize() const +{ + return m_rules->boxSize(); +} + +inline int RulesWrapper::maxParty() const +{ + return m_rules->maxParty(); +} + +inline int RulesWrapper::maxFight() const +{ + return m_rules->maxFight(); +} + +inline int RulesWrapper::maxPlayers() const +{ + return m_rules->maxPlayers(); +} + +inline int RulesWrapper::maxHeldItems() const +{ + return m_rules->maxHeldItems(); +} + +inline int RulesWrapper::maxAbilities() const +{ + return m_rules->maxAbilities(); +} + +inline int RulesWrapper::maxNatures() const +{ + return m_rules->maxNatures(); +} + +inline int RulesWrapper::maxMoves() const +{ + return m_rules->maxMoves(); +} + +inline int RulesWrapper::maxLevel() const +{ + return m_rules->maxLevel(); +} + +inline int RulesWrapper::maxStages() const +{ + return m_rules->maxStages(); +} + +inline int RulesWrapper::maxMoney() const +{ + return m_rules->maxMoney(); +} + +inline bool RulesWrapper::hardCash() const +{ + return m_rules->hardCash(); +} + +inline bool RulesWrapper::allowSwitchStyle() const +{ + return m_rules->allowSwitchStyle(); +} + +inline bool RulesWrapper::specialSplit() const +{ + return m_rules->specialSplit(); +} + +inline bool RulesWrapper::specialDVSplit() const +{ + return m_rules->specialDVSplit(); +} + +inline bool RulesWrapper::effortValuesAllowed() const +{ + return m_rules->effortValuesAllowed(); +} + +inline int RulesWrapper::maxTotalEV() const +{ + return m_rules->maxTotalEV(); +} + +inline int RulesWrapper::maxEVPerStat() const +{ + return m_rules->maxEVPerStat(); +} + +} + +#endif -- cgit