hamigaki.png (2451 bytes)

Prev Up Home Next

Class template lazy_restriction

hamigaki::iostreams::lazy_restriction —

lazy_restrictionboost::iostreams::restrictionの変種である。restrictionとの違いは、

  • オフセットの基準はストリームの先頭である

  • オフセット位置へのシークは、実際にストリームにアクセスするまで遅延される

である。

Synopsis

template<typename Device> 
class lazy_restriction {
public:
  // types
  typedef boost::iostreams::char_type_of< Device >::type char_type;

  // construct/copy/destruct
  lazy_restriction(const Device&, boost::iostreams::stream_offset, 
                   boost::iostreams::stream_offset = -1);

  // Boost.Iostreams implementation
  std::streamsize read(char_type*, std::streamsize);
  std::streamsize write(const char_type*, std::streamsize);
  std::streampos seek(boost::iostreams::stream_offset, std::ios_base::seekdir);
};

Description

lazy_restriction construct/copy/destruct

  1. lazy_restriction(const Device& dev, boost::iostreams::stream_offset off, 
                     boost::iostreams::stream_offset len = -1);

lazy_restriction Boost.Iostreams implementation

  1. std::streamsize read(char_type* s, std::streamsize n);
  2. std::streamsize write(const char_type* s, std::streamsize n);
  3. std::streampos 
    seek(boost::iostreams::stream_offset off, std::ios_base::seekdir way);
Copyright © 2006 Takeshi Mouri

Prev Up Home Next