diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-06-28 22:22:32 +0100 |
commit | c0c336500955a23e344651e5412c9d9d441ef4ee (patch) | |
tree | 790769c748db307cf3314f6e896e2f61c68561a2 /src/T2DLL/T2Transport.h | |
parent | 37e364b2c6cc7487a1c888d256a73e5337bb7189 (diff) | |
download | t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.tar.gz t2win-c0c336500955a23e344651e5412c9d9d441ef4ee.zip |
first pass of T2DLL
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2Transport.h | 73 |
1 files changed, 45 insertions, 28 deletions
diff --git a/src/T2DLL/T2Transport.h b/src/T2DLL/T2Transport.h index 4fc0443..b1e0640 100644 --- a/src/T2DLL/T2Transport.h +++ b/src/T2DLL/T2Transport.h @@ -1,39 +1,56 @@ #pragma once #include "common.h" -class T2Transport { +class AFX_EXT_CLASS T2Transport { public: T2Transport(); virtual ~T2Transport(); -private: - void Initialize(); -public: - void Init(T2Transport*, CResFile*); - void Init(T2Transport*, int); - void AddTransport(T2Transport*); + void Init(T2Transport* inParent, CResFile* inResFile); + void Init(T2Transport* inParent, int inArriveTime); + void AddTransport(T2Transport* inTransport); int GetNofTimeTable(); - void SetStation(unsigned int); - void UpGrade(int); - int GetTrainType(int) const; - unsigned int GetArriveTime(int) const; + void SetStation(unsigned int inStation); + void UpGrade(int inGrade); + int GetTrainType(int inIndex) const; + unsigned int GetArriveTime(int inIndex) const; T2Transport* GetStoppage() const; - int WasStoppage() const; -protected: - int ChkStoppage() const; - T2Transport* GetIndObject(int) const; -public: - T2Transport* GetAvailable(T2DateTime*) const; -protected: - int IsAvailable(T2DateTime*); -public: - int Enter(CLink*); - int Leave(CLink*); + BOOL WasStoppage() const; + T2Transport* GetAvailable(T2DateTime* inDateTime) const; + BOOL Enter(CLink* inLink); + BOOL Leave(CLink* inLink); CLink* LeaveFirst(); - virtual int Stop(T2TowerDoc*); - virtual void Read(T2Archive&); - virtual void Write(T2Archive&); + BOOL IsFull() const { return mNumOfContents >= mCapacity; } + + virtual int Stop(T2TowerDoc* inDoc); + virtual void Read(T2Archive& inArchive); + virtual void Write(T2Archive& inArchive); + +private: + void Initialize(); + virtual void DoSetStatus(int inStatus) = 0; + virtual T2TowerDoc *DoGetTowerDoc() const = 0; + virtual int DoGetBeginTime() = 0; + virtual T2WorldDef *DoGetWorldDef() = 0; + +protected: + BOOL ChkStoppage() const; + T2Transport* GetIndObject(int inIndex) const; + BOOL IsAvailable(T2DateTime* inDateTime); - int IsFull() const {} - T2Transport(const T2Transport&) {} - T2Transport& operator=(const T2Transport&) {} + T2Transport *mParent; + LArray *mArray; + int _C; + unsigned int mWidth; + int _14; + unsigned int mStation; + int mGrade; + int mTrainType; + int _24; + unsigned int mArriveTime; + unsigned int _2C; + BOOL mFlag; + unsigned int mCapacity; + unsigned int mNumOfContents; + CLink *mFirstLink; + CLink *mLastLink; }; |