summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2Settlement.h
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
committerAsh Wolf <ninji@wuffs.org>2023-06-28 22:22:32 +0100
commitc0c336500955a23e344651e5412c9d9d441ef4ee (patch)
tree790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2Settlement.h
parent37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff)
downloadt2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz
t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2Settlement.h64
1 files changed, 47 insertions, 17 deletions
diff --git a/src/T2DLL/T2Settlement.h b/src/T2DLL/T2Settlement.h
index dc59339..c4d41b4 100644
--- a/src/T2DLL/T2Settlement.h
+++ b/src/T2DLL/T2Settlement.h
@@ -1,31 +1,61 @@
#pragma once
#include "common.h"
-class T2Settlement {
+enum {
+ kFundGroup0,
+ kFundGroup1,
+ kFundGroup2,
+ kFundGroup3,
+ kFundGroup4,
+ kFundGroup5,
+ kFundGroup6,
+};
+
+enum {
+ kTimeLimitTypeNone,
+ kTimeLimitTypeTool,
+ kTimeLimitTypeCategory
+};
+
+enum {
+ kTimeLimitLengthNone,
+ kTimeLimitLength3Min,
+ kTimeLimitLength30Min,
+ kTimeLimitLength1Month
+};
+
+class AFX_EXT_CLASS T2Settlement {
public:
- T2Settlement(T2TowerDoc*, int);
- T2Settlement(T2TowerDoc*, T2Archive&);
+ T2Settlement(T2TowerDoc* towerDoc, int funds);
+ T2Settlement(T2TowerDoc* towerDoc, T2Archive&);
~T2Settlement();
T2Archive& Write(T2Archive&) const;
- void DoPay(int, short);
- void DoPayTool(int, short, T2ToolDef*);
- void EmitPayToolMessage(T2TowerDoc*, T2ToolDef*, const CString&, int, int);
-protected:
- T2DateTime* GetTimeLimitOfMessage(T2TowerDoc*, T2ToolDef*, int);
- void SetTimeLimitOfMessage(T2TowerDoc*, T2ToolDef*, int, T2DateTime*);
- T2DateTime* FindCategoryTimeLimit(T2TowerDoc*, T2ToolDef*);
- void LinkCategoryTimeLimit(T2TowerDoc*, T2ToolDef*, T2DateTime*);
- static T2DateTime* CalcTimeLimitOfMessage(T2DateTime*, int);
-public:
+ void DoPay(int funds, short fundGroup);
+ void DoPayTool(int funds, short fundGroup, T2ToolDef* inToolDef);
+ void EmitPayToolMessage(T2TowerDoc*, T2ToolDef*, const CString&, int length, int);
int GetCurrentFunds() const;
int GetPreviousFunds() const;
int GetTotalSettlement(short) const;
int GetToolSettlement(T2ToolDef*) const;
int GetCategorySettlement(int) const;
+ void Update();
+
protected:
- void Initialize(T2TowerDoc*, int);
-public:
- void Update();
+ T2DateTime* GetTimeLimitOfMessage(T2TowerDoc*, T2ToolDef*, int);
+ void SetTimeLimitOfMessage(T2TowerDoc*, T2ToolDef*, int, T2DateTime*);
+ T2DateTime* FindCategoryTimeLimit(T2TowerDoc*, T2ToolDef*);
+ void LinkCategoryTimeLimit(T2TowerDoc*, T2ToolDef*, T2DateTime*);
+ void Initialize(T2TowerDoc* towerDoc, int funds);
+
+ static T2DateTime* CalcTimeLimitOfMessage(T2DateTime*, int);
- T2Settlement& operator=(const T2Settlement&) {}
+ T2TowerDoc *mDocument;
+ int mCurrentFunds;
+ int mPreviousFunds;
+ int mC;
+ int m10;
+ int m14;
+ int m18;
+ int m1C;
+ LArray *mCategoryTimeLimitList;
};