[译]C ++文件生成器
By robot-v1.0
本文链接 https://www.kyfws.com/applications/c-file-generator-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 2 分钟阅读 - 871 个词 阅读量 0[译]C ++文件生成器
原文地址:https://www.codeproject.com/Articles/5766/c-file-generator
原文作者:s o v a n n
译文由本站 robot-v1.0 翻译
前言
generate c++ file and interface header
生成C ++文件和接口头
技术指标(Specifications)
- 根据用户输入和模板文件生成c ++标头和源(generate c++ header and source based on user input and template file)
- 根据输入文件生成c ++接口头(generate c++ interface header based on input file)
技术(Technical)
- 将用户输入映射到模板文件中的<文件> <编程器> <日期> <法律>(map user input to in template file)
- 这些标签可以移动到模板文件中的任何位置(these tags can be moved anywhere in the template file)
- 接口头如何生成(how interface header is generated)
怎么做(how) | 速度(speed) | 检测(detect) |
---|---|---|
smart | slow | automatically |
syntax | fast | 仅在 .. 之间(between .. only) |
[语法检测的例子]([ex of syntax detection])
ass假设KBox实现了Box和Primitive接口(・ assuming KBox implements Box and Primitive interface) graph graph.cpp-> graph.h(・ graph.cpp -> graph.h) ・通知接口编写器如何检测语法(・ notify how the interface writer detect syntax)
class KBox : public Box {
public :
KBox() {}
~KBox() {}
// <Primitive>
void setName(TSTR v);
void setColor(long v);
TSTR name();
long color();
// </Primitive>
// <Box>
void setWidth(int v);
void setLength(int v);
void setHeight(int v);
int width();
int length();
int height();
// </Box>
};
class Primitive {
public :
virtual void setName(TSTR v)=0;
virtual void setColor(long v)=0;
virtual TSTR name()=0;
virtual long color()=0;
};
class Box {
public :
virtual void setWidth(int v)=0;
virtual void setLength(int v)=0;
virtual void setHeight(int v)=0;
virtual int width()=0;
virtual int length()=0;
virtual int height()=0;
};
历史(History)
日期(date) | 版(version) | 行动(action) |
---|---|---|
01/05/2004 | 1.0.0.2 | ・ posted |
01/07/2004 | template将模板扩展名从.txt更改为.h(・ change template extension from .txt to .h) all将所有画家放在painter.dll中(・ put all painters in painter.dll) | |
01/10/2004 | 1.0.0.3 | red减少金属画家支持将鼠标移至焦点上方(・ reduce to metal painter supporting mouse over focus)删除painter.dll util.dll(・ remove painter.dll util.dll) |
01/19/2004 | use使用位图代替文本(・ use bitmap instead of text) |
免责声明(Disclaimer)
该软件按"原样"提供,不提供任何形式的担保.(This software is provided ‘as is’ without warranty of any kind…)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C++ VC7.0 Windows WinXP MFC Visual-Studio Dev 新闻 翻译