hamigaki.png

前のページ 上に戻る ホーム 次のページ

Class template basic_zip_file_source

hamigaki::archivers::basic_zip_file_source —

ZIPファイルへの読み込み専用アクセスを提供するSourceモデル

Synopsis

template<typename SeekableSource> 
class basic_zip_file_source {
public:
  // types
  typedef char                   char_type;  
  typedef implementation defined category;   
  typedef zip::header            header_type;

  // construct/copy/destruct
  explicit basic_zip_file_source(const SeekableSource&);

  // Boost.Iostreams implementation
  std::streamsize read(const char*, std::streamsize);

  // Hamigaki.Archivers implementation
  bool next_entry();
  void select_entry(const boost::filesystem::path&);
  zip::header header() const;

  // modifiers
  void password(const std::string&);
};

Description

SeekableSourceを受け取り、ZIPファイルとしてフォーマットを解釈した結果を読み出すことができる。

モデルとなるコンセプト:Source

basic_zip_file_source construct/copy/destruct

  1. explicit basic_zip_file_source(const SeekableSource& src);

basic_zip_file_source Boost.Iostreams implementation

  1. std::streamsize read(const char* s, std::streamsize n);
    Effects: header().methodに従い、現在のエントリの圧縮イメージを展開して読み出す。
    Throws: 現在のエントリが暗号化されていて、パスワードが正しくない場合、password_incorrect

basic_zip_file_source Hamigaki.Archivers implementation

  1. bool next_entry();
    Effects: 読み出しの対象を次のエントリに移動する
    Returns: 次のエントリがあればtrue、なければfalse
  2. void select_entry(const boost::filesystem::path& ph);
    Effects: 読み出しの対象をパスphのエントリに移動する
  3. zip::header header() const;
    Returns: ヘッダ情報

basic_zip_file_source modifiers

  1. void password(const std::string& pswd);
    Effects: 暗号化されたZIPファイルの復号に用いるパスワードをpswdに設定する
製作著作 © 2006-2008 Takeshi Mouri

前のページ 上に戻る ホーム 次のページ