BidirectionalFilter: Filters two separate character sequences, one read from a Sink and the other written to a Sink.
SeekableFilter: Filters a single characters sequence, controlled by a SeekableDevice, providing filtered input, output and random access with a single repositionable read/write head
Optional Behavior
Boost.Iostreams prvides several concepts corresponding to optional behavior that a Filter or Device might implement:
Blocking: A Device which blocks when it receives a read or write request until all requested characters are available, or until the end of a stream is reached.
Direct: A Device which provides access to its controlled sequences as regions of memory rather than via a socket-like interface.
Closable: A Filter or Device which receives notifications immediately before a stream is closed.
Flushable A Filter or Device which receives notifications when a stream is flushed.
Localizable: A Filter or Device which receives notifications when the locale of a stream or stream buffer is set using basic_ios::imbue or basic_streambuf::pubimbue.
Multi-Character: A Filter which provides access to its controlled sequences several characters at a time, via a socket-like interface.
OptimallyBuffered A Filter or Device which will be fitted with a buffer of custom size if no buffer size is explicitly requested by the user.
Peekable: A source which allows characters to be put back to the input sequence.
]]>1.modeshttp://www.shnenglu.com/Error/archive/2012/11/19/195348.htmlEnicEnicMon, 19 Nov 2012 03:49:00 GMThttp://www.shnenglu.com/Error/archive/2012/11/19/195348.htmlhttp://www.shnenglu.com/Error/comments/195348.htmlhttp://www.shnenglu.com/Error/archive/2012/11/19/195348.html#Feedback0http://www.shnenglu.com/Error/comments/commentRss/195348.htmlhttp://www.shnenglu.com/Error/services/trackbacks/195348.htmlmode錛堟ā寮忥紵錛夛細 input: 浣跨敤涓涓猚haracter闃熷垪錛岀敤鏉ヨ緭鍏?br> output: 浣跨敤涓涓猚haracter闃熷垪錛岀敤鏉ヨ緭鍑?br> bidirectional: 浣跨敤涓や釜character闃熷垪錛屽垎鍒敤鏉ヨ緭鍏ャ佽緭鍑?br> input-seekable: 浣跨敤涓涓猚haracter闃熷垪鐢ㄦ潵杈撳叆錛屽寘鍚竴涓绱㈠紩娓告爣 output-seekable: 浣跨敤涓涓猚haracter闃熷垪鐢ㄦ潵杈撳嚭錛屽寘鍚竴涓啓绱㈠紩娓告爣 seekable: 浣跨敤涓涓猚haracter闃熷垪鐢ㄦ潵杈撳叆杈撳嚭錛屽寘鍚竴涓/鍐欏鐢ㄧ殑绱㈠紩娓告爣 dual-seekable: 浣跨敤涓涓猚haracter闃熷垪鏉ヨ緭鍏ヨ緭鍑猴紝鍖呭惈涓や釜绱㈠紩娓告爣鍒嗗埆鐢ㄦ潵鏍囪瘑璇誨啓 bidirectional-seekable: 浣跨敤涓や釜character闃熷垪鍒嗗埆鐢ㄦ潵杈撳叆杈撳嚭錛屽悓鏃舵瘡涓槦鍒楀寘鍚竴涓悇鑷殑绱㈠紩娓告爣 *blocking: 濡傛灉璇昏姹傛案榪滄瘮鍓╀笅鐨刢haracter灝戦櫎浜唀nd鎯呭喌錛岃屼笖鍐欒姹傞渶瑕佺殑姘歌繙姣旂幇鏈夌殑灝戙傞偅灝辨槸涓涓猙locking銆?br>The Blocking concept does not apply to filters. Instead, filters are required to be blocking-preserving, which means that
a read request never produces fewer characters than requested unless end-of-stream has been reached or unless a read request to a downsteam Source produces fewer characters than requested, and a write request never consumes fewer characters than requested unless a write request to a downsteam Sink consumes fewer characters than requested.