Error

C++博客 首页 新随笔 联系 聚合 管理
  217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks

原因:

1.文档不够完善

2.熟悉程度不够,学习曲线比较陡峭,直接用有可能失控

3.实现太过复杂,还需要mpl库的支持

4.如果使用,iostreams将成为底层,整个项目都会对其依赖,有风险

5.说白了,还是能力不够,不过了解了一些iostreams归纳出来的concepts也是非常有收货。

6.网上的一句归纳:

在真正掌握模版之前尽量少用

//////////////////////////////////////////////

Device Concepts

The most important Device concepts are these:

  • Device: Base for all Device concepts, provides associated character type and category.
  • Source: Provides read-only access to a sequence of characters.
  • Sink: Provides write-only access to a sequence of characters.
  • BidirectionalDevice: Provides access to two separate sequences of characters, one for reading and the other for writing.
  • SeekableDevice: Provides read-write access to a single sequence of characters, with a single repositionable read/write head.

Filter Concepts

The most important Filter concepts are these:

  • Filter: Base for all Filter concepts, provides associated character type and category.
  • InputFilter: Filters characters read from a Source.
  • OutputFilter: Filters characters written to a Sink
  • 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.
  • Pipable: A Filter which can appear in pipelines.
posted on 2012-11-19 16:17 Enic 阅读(94) 评论(0)  编辑 收藏 引用 所属分类: boost::iostream

只有注册用户登录后才能发表评论。
【推荐】超50万行VC++源码: 大型组态工控、电力仿真CAD与GIS源码库
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理