1 / 60
文档名称:

z-lect4-pipefilterprog(不讲).ppt

格式:ppt   大小:360KB   页数:60页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

z-lect4-pipefilterprog(不讲).ppt

上传人:wxc6688 2018/6/26 文件大小:360 KB

下载得到文件列表

z-lect4-pipefilterprog(不讲).ppt

相关文档

文档介绍

文档介绍:Lecture 4. Implementation of kwic in Java -Pipes and Filers Architecture
Pipeline in KWIC System Design of Filter Classes
For the purpose of design KWIC system using
pipes and filters architecture, we need to have the
following four filters:
Input filter
CircularShifter filter
Alphabetizer filter
Output filter
We can design all KWIC filters as subclasses of an
abstract Filter class. See the following class
diagram:
Filter
Input
Output
Circularshifter
Alphabetizer
Use a Filter super class to be mon interface
Pipeline in KWIC System Design of Filter Classes
Pipeline in KWIC system (整体结构)
The following pipes are needed to connect the
filters:
in_cs pipe, is shared between Input and CircularShifter, , this pipe is the output pipe for Input filter and the input pipe for CircularShifter filter.
cs_al pipe, is shared between CircularShifter and Alphabetizer, , this pipe is the output pipe for CircularShifter filter and the input pipe for Alphabetizer filter.
cs_ou pipe, is shared between Alphabetizer and Output, , this pipe is the output pipe for Alphabetizer filter and the input pipe for Output filter.
The following figure shows the current pipeline
including the pipe names:
Input
Output
Circularshifter
Alphabetizer
Input Medium
Output
Medium
in_cs
cs_al
al_ou
Pipeline in KWIC system (整体结构)
Pipeline in KWIC system (整体结构)
How a concrete pipe line is setup?
Filter objects bined into a typical producer/consumer scenario by simply sharing a pipe object.
Assign the output pipe of the first filter to the input pipe of the second filter.
When the first filter produces some data and writes it to its output pipe, this data is available for the second filter to consume it.
Architecture of the Project 项目的整体结构
Functionalities of ponents:
Input filter:
Read the content of a input file (.txt file),
Parse it, and
Write the parsed lines to its output stream pipe in_cs char by char, using (c) .
Architecture of the Project

最近更新