weatherinfo.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 76 行
H
76 行
////////////////////////////////////////////////////////////////////////////////// Filename : WeatherInfo.h// Written By : Reiot// Description : ////////////////////////////////////////////////////////////////////////////////#ifndef __WEATHER_INFO_H__#define __WEATHER_INFO_H__#include "Types.h"#include "Exception.h"////////////////////////////////////////////////////////////////////////////////// class WeatherInfo;////////////////////////////////////////////////////////////////////////////////class WeatherInfo {public: // 犬伏蔼阑 颇扼固磐肺 逞败林搁, 坷疵狼 朝揪甫 府畔茄促. Weather getWeather(uint probability) const throw(); // 漂沥 朝揪狼 犬伏阑 府畔茄促. uint getProbability(Weather weather) const throw() { return m_Probabilities[weather]; } // 漂沥 朝揪狼 犬伏阑 瘤沥茄促. void setProbability(Weather weather, uint prob) throw() { m_Probabilities[weather] = prob; } // get debug string string toString() const throw();private: uint m_Probabilities[WEATHER_MAX];};////////////////////////////////////////////////////////////////////////////////// class WeatherInfoManager;//// 岿喊 朝揪 沥焊甫 包府窍绰 概聪历 努贰胶捞促.////////////////////////////////////////////////////////////////////////////////class WeatherInfoManager {public: // init vision info void init() throw(Error) { load(); } // load from database void load() throw(Error); // save to database void save() throw(Error) { throw UnsupportedError(); } // get vision info const WeatherInfo & getWeatherInfo(int month) const throw(OutOfBoundException) { if(month > 12) throw OutOfBoundException("too large month value"); return m_WeatherInfos[ month - 1 ]; } // get debug string string toString() const throw();private: // WeatherInfo狼 捞瞒盔 硅凯 WeatherInfo m_WeatherInfos[12];};// global variable declarationextern WeatherInfoManager* g_pWeatherInfoManager;#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?