ozipstream.h

来自「这是一个兼容C++标准的IO流接口」· C头文件 代码 · 共 37 行

H
37
字号
//------------------------------------------------------------------------------
// (c) 2001 Gottfried Chen
//------------------------------------------------------------------------------

#ifndef OZIPSTREAM_H
#define OZIPSTREAM_H

#include "ozipbuf.h"


namespace zip
{

template<class Character, class Traits = std::char_traits<Character> >
class basic_ozipstream : public std::basic_ostream<Character, Traits>
{
public:
    basic_ozipstream(ozipfile& zip, const char* fileName,
                     std::ios_base::openmode = std::ios_base::out | std::ios_base::trunc);

    void open(ozipfile& zip, const char* fileName,
              std::ios_base::openmode = std::ios_base::out | std::ios_base::trunc);
    void close();

private:
    basic_ozipbuf<Character, Traits> mBuffer;
};

typedef basic_ozipstream<char> ozipstream;

// Attention: No wide to multibyte character translation is done on output.
typedef basic_ozipstream<wchar_t> wozipstream;

} // namespace zip

#include "ozipstream.inl"
#endif // OZIPSTREAM_H

⌨️ 快捷键说明

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