📄 warsvrfile.h
字号:
/** */#ifndef WAR_SVR_FILE_H#define WAR_SVR_FILE_H/* SYSTEM INCLUDES *//* PROJECT INCLUDES */#ifndef WAR_FILE_H# include "WarFile.h"#endif#ifndef WAR_SVR_PATH_H# include "WarSvrPath.h"#endif#ifndef WAR_TRANSFER_BUFFER_H# include "WarTransferBuffer.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarSvrFile : public WarFile{public: typedef void (*callback_t) (war_cptr_t, const WarError&, war_transfer_buffer_ptr_t&); // LIFECYCLE /** * Default constructor. */ WarSvrFile(void); /** * Destructor. */ ~WarSvrFile(void); // OPERATORS void AssignCallback(callback_t func, war_cptr_t arg); // OPERATIONS /** Open a UTF8 pats, as seen by the server. */ void Open(const WarSvrPath& filePath, const war_uint32_t openFlags) throw(WarException); virtual void Close() throw(WarException); // ACCESS // INQUIRY WarSvrPath mSvrPath; protected: virtual void OnRead(const WarError& status, war_transfer_buffer_ptr_t& buffer); virtual void OnWritten(const WarError& status, war_transfer_buffer_ptr_t& buffer); callback_t my_callback; war_cptr_t my_callback_arg;private:};/* INLINE METHODS */template <class fromT>inline WarSvrFile& operator << (WarSvrFile& to, const fromT& from){ to.AddFrom(from); return to;}/* EXTERNAL REFERENCES */typedef WarPtrWrapper<WarSvrFile> war_svrfile_ptr_t;#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif /* WAR_SVR_FILE_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -