A Generalized Parsing Class for MFC - 项目摘要 |
摘要
| 管理 |
论坛 文档
| 软件包 |
|
|
|
项目描述: |
One of the many tasks that a programmer has is taking a set of characters and breaking it down ino its discrete parts. This may be a comma delimited data file, a full directory path, or a set of program directives to perform an action verb and supply arguments. I often do this to implement a command handler for other classes. Rather than send the data to the class as disparate arguments I build a command string such as "Title=the Title@Start Date=12/12/1998@price=12.45" and pass it to the class which then parses the command string and sets the appropriate class variables.
程序员的一项工作之一就是接收一套字符,再将它们分割成离散的部分,或者是一套程序来执行动作和提供参数。这经常用这个功能来实现一个其它类的命令处理器。不用将数据发送到这个作为不同的参数,我生成了一个命令行字符串"Title=the Title@Start Date=12/12/1998@price=12.45",将它传递给这个类,由这个类来分析命令行字符串,并设置相应的类变量。
来源: http://www.codeguru.com/cpp_mfc/parser.shtml |
类别: |
|
发布者:
cbd002
|
|
最新发布源码包 |
软件包 |
版本号 |
日期 |
本地下载 |
parser |
 1.0  |
2004-04-09 |
下载 |
|
|