Click here to Skip to main content
Click here to Skip to main content

c++ file generator

By , 10 Jul 2004
 

     generator          interface generator       

Specifications

  • generate c++ header and source based on user input and template file
  • generate c++ interface header based on input file

Technical

  • map user input to <file> <programer> <date> <legal> 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 <interface>..</interface> only



[ex of syntax detection]

 ・ assuming KBox implements Box and Primitive interface
 ・ 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   ・ change template extension from .txt to .h
  ・ put all painters in painter.dll
 01/10/2004   1.0.0.3   ・ reduce to metal painter supporting mouse over focus
  ・ remove painter.dll util.dll
 01/19/2004   ・ use bitmap instead of text

Disclaimer

This software is provided 'as is' without warranty of any kind...

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

s o v a n n
Japan Japan
Member
Smile | :) Smile | :) Smile | :)

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralMy vote of 2memberauge__10 Jun '10 - 1:15 
This could be good. If it only starts at all ...
GeneralFile not foundmembervrpatil11 Jul '04 - 19:51 
when app is run error MSVCP70.dll was not found error shows up!
any solution
GeneralMFC70.dllmemberw_o_l_f_e18 Apr '04 - 6:45 
MFC70.dll could not be found
Confused | :confused:
QuestionAs if?memberNGS 5496725 Jan '04 - 6:05 
Disclaimer
This software is provided 'as if' without warranty of any kind...
 
'as if' it will work?
 

 
Confoosed
AnswerRe: As if?memberRick York5 Jan '04 - 6:32 
I think it should probably have been "as is."

 
The Ten Commandments For C Programmers

Generalsay more ...memberMaximilien5 Jan '04 - 5:15 
please tell us more about this, about the template format ...
Thanks.

 

Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 11 Jul 2004
Article Copyright 2004 by s o v a n n
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid