hamigaki.png (2451 bytes)

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

Class template repetition

hamigaki::iostreams::repetition —

クラステンプレートrepetitionは、Sourceを受け取り、それを指定回数だけ繰り返し読み出すことのできるSourceを形成する。

Synopsis

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

  // construct/copy/destruct
  repetition(const Source&, int);

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

// creation
template<typename Source> repetition< Source > repeat(const Source&, int);

Description

repetition construct/copy/destruct

  1. repetition(const Source& src, int count);

    Effects: srccount回のループを形成する。count == -1の場合は、無限ループになる。

repetition Boost.Iostreams implementation

  1. std::streamsize read(char_type* s, std::streamsize n);
  2. void close();

repetition creation

  1. template<typename Source> 
      repetition< Source > repeat(const Source& src, int count);

    Returns: repetition< Source >(src, count)

製作著作 © 2006 Takeshi Mouri

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