#pragma once #include "common.h" class AFX_CLASS_EXPORT T2PlaceParamDef { public: enum EPlace { Place_0, // pool Place_1, // tenant Place_2, // floor kMaxPlace }; T2PlaceParamDef(CResFile& resFile); virtual ~T2PlaceParamDef(); public: unsigned int GetPercent(EPlace place) const; float GetRate(EPlace place) const; short GetScore(EPlace place) const; protected: struct { unsigned int mPercent; short mScore; float mRate; } mEntries[kMaxPlace]; }; inline unsigned int T2PlaceParamDef::GetPercent(EPlace place) const { return mEntries[place].mPercent; } inline float T2PlaceParamDef::GetRate(EPlace place) const { return mEntries[place].mRate; } inline short T2PlaceParamDef::GetScore(EPlace place) const { return mEntries[place].mScore; }