Planeshift

testrpgrules.h

Go to the documentation of this file.
00001 /*
00002  *  testrpgrules.h - Author: Keith Fulton
00003  *
00004  * Copyright (C) 2009 Atomic Blue ([email protected], http://www.atomicblue.org) 
00005  *
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation (version 2 of the License)
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017  *
00018  */
00019 
00020 class psMoney;
00021 
00022 class TestRPGRules
00023 {
00024 public:
00025     TestRPGRules(iObjectRegistry* object_reg);
00026     ~TestRPGRules();
00027 
00028     int Run();
00029 
00030 private:
00031     void PrintHelp();
00032     void PrintOutput(const char* string, ...);
00033 
00034         bool TestMoney(iDocumentNode *testnode);
00035         bool InitMoney(iDocumentNode *command, psMoney& money);
00036         bool CheckMoneyString(iDocumentNode *command, psMoney& money);
00037         bool CheckMoneyTotal(iDocumentNode *command, psMoney& money);
00038         bool CheckMoneyTrias(iDocumentNode *command, psMoney& money);
00039         bool CheckMoneyHexas(iDocumentNode *command, psMoney& money);
00040         bool CheckMoneyOctas(iDocumentNode *command, psMoney& money);
00041         bool CheckMoneyCircles(iDocumentNode *command, psMoney& money);
00042         bool AdjustTrias(iDocumentNode *command, psMoney& money);
00043         bool AdjustHexas(iDocumentNode *command, psMoney& money);
00044         bool AdjustOctas(iDocumentNode *command, psMoney& money);
00045         bool AdjustCircles(iDocumentNode *command, psMoney& money);
00046         bool AdjustMoney(iDocumentNode *command, psMoney& money);
00047         bool CheckUserString(iDocumentNode *command, psMoney& money);
00048         bool NormalizeMoney(iDocumentNode *command, psMoney& money);
00049         bool CheckGreaterThan(iDocumentNode *command, psMoney& money);
00050         bool SubtractMoney(iDocumentNode *command, psMoney& money);
00051         bool NegateMoney(iDocumentNode *command, psMoney& money);
00052         bool MultiplyMoney(iDocumentNode *command, psMoney& money);
00053 
00054         iObjectRegistry* object_reg;
00055         csRef<iVFS> vfs;
00056         csRef<iFile> log;
00057         csRef<iDocumentSystem> docsys;
00058 
00059 };