hamigaki.png (2451 bytes)

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

Class template tiny_restriction

hamigaki::iostreams::tiny_restriction —

tiny_restrictionboost::iostreams::restrictionの退化した変種であり、単に読み書きの文字数を制限する。

Synopsis

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

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

  // Boost.Iostreams implementation
  std::streamsize read(char_type*, std::streamsize);
  std::streamsize write(const char_type*, std::streamsize);
};

// creation
template<typename Device> 
  tiny_restriction< Device > 
  tiny_restrict(const Device&, boost::iostreams::stream_offset = -1);

Description

意味上は、オフセット=0のboost::iostreams::restrictionに相当するが、オフセット移動に用いられるget()/seek()操作を必要としない。get()操作はstd::char_traitsの文字型に対する特殊化を要求するため、floatなどの標準で特殊化されない文字型を使用する場合に役に立つ。

tiny_restriction construct/copy/destruct

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

tiny_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);

tiny_restriction creation

  1. template<typename Device> 
      tiny_restriction< Device > 
      tiny_restrict(const Device& dev, boost::iostreams::stream_offset len = -1);

    Returns: tiny_restriction< Device >(dev, len)

製作著作 © 2006 Takeshi Mouri

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