联盟首页 协同开发 共创软件 开放源码 软件工程 共创论坛 关于联盟
  您的位置 » 开放源码库【成熟 - 项目摘要 首页 | 分类源码 | 提交源码 | 下载统计 | 原创源码 | 成熟源码 | 代码片断
 
 Intelligent enum's in C++ Applications - 项目摘要
摘要 | 管理 | 论坛
文档 | 软件包

源码库中源码数量为18996
有贡献人员名单:

-= 更多 =-
  • ffdshow
  • jasperreports
  • Air Traffic Controller
  • PoolMan
  • virtualdub-win
  • Apache-SSL-Jserv
  • CppUnit
  • FCK editor
  • GLgraph
  • Async Professional
  • -= 更多 =-

    项目描述:
    On several occasions in the past I have found C++ enumerations lacking. Enums need an automatic default and Enums need string functionality along with the integer value, particularily in applications that interact with a user either on a GUI or in an error message.

    I thus concieved the idea to represent Enums as C++ classes which provide all the standard functionality of an enum, by overiding the relevant operators. And then adding the extra functionality desired.

    Rather than writing these classes, a utility which translates standard Enum declerations to such classes would be great. Along with the idea, I have supplied a utility EC (enum compiler) that will do the job on Microsoft platforms

    过去我有时发现C++的枚举功能有些缺陷。 Enums需要一个自动的缺省值,并为整数提供一个字符串功能,尤其在一个GUI或错误消息中和用户交互时。
    所以我设想用C++类来取代 Enums ,通过重载相关的操作符来提供 enum的所有功能。以后再增加额外的功能。不用写这些类,而是使用一个工具将标准的 Enum 声明转换为这样的类将是很方便的。我提供了一个EC (enum compiler) 工具来在 Microsoft 平台上完成这一功能。
    来源: http://www.codeguru.com/cpp_mfc/EC.html
    类别:
    发布者: cbd002

    最新发布源码包
    软件包 版本号 日期 本地下载
    EC10  1.0  2004-04-14 下载

    原始下载连接(国外) http://www.codeguru.com/code/legacy/cpp_mfc/EC10.zip

      » 合 作 伙 伴