From c0c336500955a23e344651e5412c9d9d441ef4ee Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 28 Jun 2023 22:22:32 +0100 Subject: first pass of T2DLL --- src/T2DLL/T2PeoplePtrList.h | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'src/T2DLL/T2PeoplePtrList.h') diff --git a/src/T2DLL/T2PeoplePtrList.h b/src/T2DLL/T2PeoplePtrList.h index 8738224..6a3b198 100644 --- a/src/T2DLL/T2PeoplePtrList.h +++ b/src/T2DLL/T2PeoplePtrList.h @@ -1,29 +1,26 @@ #pragma once #include "common.h" +#include "LArray.h" -class T2PeoplePtrList { +class AFX_EXT_CLASS T2PeoplePtrList : public LArray { public: - T2PeoplePtrList(int); + T2PeoplePtrList(int count = 0); virtual ~T2PeoplePtrList(); -protected: - void Init(unsigned int); -public: - int Add(T2People*); - T2People* GetItemAt(int) const; - int GetPeopleIndex(T2People*, int&) const; - int HasSpace() const; + BOOL Add(T2People* people); + T2People* GetItemAt(int index) const; + BOOL GetPeopleIndex(T2People* people, int& outIndex) const; + BOOL HasSpace() const; void Clear(); - void Clear(T2People*); - void SetDestination(unsigned int); - void ChangeDestination(unsigned int); - void SetReturn(unsigned int); - void IncStress(int); - void IncEstimate(int); - int InSameTenant(unsigned int) const; - void LoadSelf(T2Archive&, T2PeopleArrayList*); - void SaveSelf(T2Archive&) const; + void Clear(T2People* people); + void SetDestination(unsigned int tenantID); + void ChangeDestination(unsigned int tenantID); + void SetReturn(unsigned int tenantID); + void IncStress(int value); + void IncEstimate(int value); + BOOL InSameTenant(unsigned int tenantID) const; + void LoadSelf(T2Archive& archive, T2PeopleArrayList* list); + void SaveSelf(T2Archive& archive) const; - T2PeoplePtrList(const T2PeoplePtrList&) {} - T2PeoplePtrList& operator=(const T2PeoplePtrList&) {} - void `default constructor closure'() {} +protected: + void Init(unsigned int count); }; -- cgit v1.2.3