Planeshift
testrpgrules.h
Go to the documentation of this file.
1 /*
2  * testrpgrules.h - Author: Keith Fulton
3  *
4  * Copyright (C) 2009 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5  *
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation (version 2 of the License)
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */
19 
20 class psMoney;
21 
23 {
24 public:
25  TestRPGRules(iObjectRegistry* object_reg);
26  ~TestRPGRules();
27 
28  int Run();
29 
30 private:
31  void PrintHelp();
32  void PrintOutput(const char* string, ...);
33 
34  bool TestMoney(iDocumentNode *testnode);
35  bool InitMoney(iDocumentNode *command, psMoney& money);
36  bool CheckMoneyString(iDocumentNode *command, psMoney& money);
37  bool CheckMoneyTotal(iDocumentNode *command, psMoney& money);
38  bool CheckMoneyTrias(iDocumentNode *command, psMoney& money);
39  bool CheckMoneyHexas(iDocumentNode *command, psMoney& money);
40  bool CheckMoneyOctas(iDocumentNode *command, psMoney& money);
41  bool CheckMoneyCircles(iDocumentNode *command, psMoney& money);
42  bool AdjustTrias(iDocumentNode *command, psMoney& money);
43  bool AdjustHexas(iDocumentNode *command, psMoney& money);
44  bool AdjustOctas(iDocumentNode *command, psMoney& money);
45  bool AdjustCircles(iDocumentNode *command, psMoney& money);
46  bool AdjustMoney(iDocumentNode *command, psMoney& money);
47  bool CheckUserString(iDocumentNode *command, psMoney& money);
48  bool NormalizeMoney(iDocumentNode *command, psMoney& money);
49  bool CheckGreaterThan(iDocumentNode *command, psMoney& money);
50  bool SubtractMoney(iDocumentNode *command, psMoney& money);
51  bool NegateMoney(iDocumentNode *command, psMoney& money);
52  bool MultiplyMoney(iDocumentNode *command, psMoney& money);
53 
54  iObjectRegistry* object_reg;
55  csRef<iVFS> vfs;
56  csRef<iFile> log;
57  csRef<iDocumentSystem> docsys;
58 
59 };
TestRPGRules(iObjectRegistry *object_reg)