gametime.h
来自「天之炼狱1服务器端源文件游戏服务端不完整」· C头文件 代码 · 共 106 行
H
106 行
//--------------------------------------------------------------------------------//// Filename : GameTime.h// Written By : Reiot////--------------------------------------------------------------------------------#ifndef __GAME_TIME_H__#define __GAME_TIME_H__// include files#include "Types.h"#include "Exception.h"#include "SocketInputStream.h"#include "SocketOutputStream.h"//--------------------------------------------------------------------------------//// 霸烙 郴俊辑狼 矫埃阑 唱鸥辰促.////--------------------------------------------------------------------------------class GameTime {public : // 家南俊 embedding 登妨绰 按眉绰 促澜苞 鞍篮 皋筋靛甫 备泅秦具 茄促. // 唱吝俊绰 捞芭 牢磐其捞胶肺 秦搬且 傈噶捞促. // read from socket input stream void read (SocketInputStream & iStream) throw (ProtocolException, Error); // write to socket output stream void write (SocketOutputStream & oStream) const throw (ProtocolException, Error); // get size of object uint getSize () const throw () { return szWORD + szBYTE* 5; } static uint getMaxSize () throw () { return szWORD + szBYTE* 5; }public : // get/set year WORD getYear () const throw () { return m_Year; } void setYear (WORD year) throw () { m_Year = year; } // get/set month BYTE getMonth () const throw () { return m_Month; } void setMonth (BYTE month) throw () { m_Month = month; } // get/set day BYTE getDay () const throw () { return m_Day; } void setDay (BYTE day) throw () { m_Day = day; } // get/set hour BYTE getHour () const throw () { return m_Hour; } void setHour (BYTE hour) throw () { m_Hour = hour; } // get/set minute BYTE getMinute () const throw () { return m_Minute; } void setMinute (BYTE minute) throw () { m_Minute = minute; } // get/set second BYTE getSecond () const throw () { return m_Second; } void setSecond (BYTE second) throw () { m_Second = second; } // get english month string string getMonthString () const throw () { switch (m_Month) { case 1 : return "JAN"; case 2 : return "FEB"; case 3 : return "MAR"; case 4 : return "APR"; case 5 : return "MAY"; case 6 : return "JUN"; case 7 : return "JUL"; case 8 : return "OUG"; case 9 : return "SEP"; case 10 : return "OCT"; case 11 : return "NOV"; case 12 : return "DEC"; } return "???"; } // get debug string string toString () const throw ();private : // YYYY-MM-DD WORD m_Year; BYTE m_Month; BYTE m_Day; // HH:MM:SS BYTE m_Hour; BYTE m_Minute; BYTE m_Second; };#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?