⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 warasciimapper.h

📁 ftpserver very good sample
💻 H
字号:
/** */#ifndef WAR_ASCII_MAPPER_H#define WAR_ASCII_MAPPER_H/* SYSTEM INCLUDES *//* PROJECT INCLUDES */#ifndef WAR_FILE_DRIVER_FILE_H#   include "WarFileDriverFile.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */#ifdef GNUCPP#define WAR_MAX_FLEN_VAL __extension__  0xffffffffffffffffLL#else#define WAR_MAX_FLEN_VAL 0x7fffffffffffffff#endif#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplus/** Nested WarFileDriverFile to handle ascii  input/output mapping   Calls the native driver to access the file.  */class WarAsciiMapper : public WarFileDriverFile{public:    // LIFECYCLE    ///    WarAsciiMapper(WarFileDriverFile *pDriverFile)        throw(WarException);    ///    ~WarAsciiMapper();    // OPERATORS    // OPERATIONS                            ///    virtual void Open(const WarUrl& openUrl,         war_uint32_t openFlags)        throw(WarException);    ///    virtual void Close() throw(WarException);    ///    virtual war_uint32_t Read(war_cptr_t Buf,         war_uint32_t bytes)        throw(WarException);    ///    virtual void Write(war_ccptr_t Buf,         war_uint32_t bytes)        throw(WarException);    ///    virtual void Flush() throw(WarException);    ///    virtual war_flen_t Seek(war_flen_t fileOffset,         SeekModes seekMode)        throw(WarException);    // ACCESS    // INQUIRY    ///    virtual war_flen_t GetLength() throw(WarException);    ///    virtual war_flen_t GetPosition() throw(WarException);    ///    virtual bool IsEof() throw(WarException);    ///    virtual bool IsOpen() throw(WarException)    {        return mpDriverFile->IsOpen();    }    ///    virtual const war_uint32_t GetFlags() const throw(WarException)    {        return mpDriverFile->GetFlags();    }    protected:private:    /// Ascii mode. Turend on by constructor    bool mIsAscii;    /// Write CRLF as EOL in textfiles. Initialized to system default.    bool mDoCrLfOut;    /// Current Ascii Position in file    war_flen_t mAsciiPos;    /// Current binary position in the file    war_flen_t mBinPos;        ///    WarFileDriverFile *mpDriverFile;        // Ascii mapping functions    war_uint32_t AsciiRead (war_cptr_t Buf,         war_uint32_t bytes)        throw(WarException);    void AsciiWrite (war_ccptr_t Buf,         war_uint32_t bytes)        throw(WarException);    war_flen_t AsciiSeek(war_flen_t fileOffset,         SeekModes seekMode)        throw(WarException);    war_flen_t AsciiGetLength()        throw(WarException);    war_flen_t AsciiGetPositon()        throw(WarException);    void AsciiDoSeek(const war_flen_t position = WAR_MAX_FLEN_VAL)        throw(WarException);};/* INLINE METHODS *//* EXTERNAL REFERENCES */#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* WAR_ASCII_MAPPER_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -