quote:
Original post by Sneftel
You mean, like SWIG does?
How appropriate. You fight like a cow.
There is a lot that I dont understand from what I read on the SWIG website.
![](sad.gif)
All I want to do is to use a header file to generate some C++ code from it namely a class declaration and function definitions complete with arguments etc and some defunct code that I could then use to generate more code, namely, this
1) Have a header file blah.h that contains the interface
2) Generate a .cpp file from it that has the class declaration and function definitions with defunct/default code and some placeholders/tags(layman language used here owing to lack of specuialized knowldge of PERL or scripting in general) that are to be replaced in Step 3
3) Use the file from Step 2 and replace the placeholders with some information that is provided (by means of an input config file/command line/whatever other means) and must be replaced uniformally in the entire file(from Step 2)
Requirements that MUST be met from the FINAL PROCESSED OUTPUT FILE from Step 3 are:
1) The length of each line of code (that can be compiled by a standard C++ compiler) must NOT exceed 78 characters
2) Indentation and other standard formatting features must be retained and no user intervention must be needed in order to beautify or standardize the code to something that is normally acceptable as code that can be accpeted in a code repository.
3) Last, stating the obvious of course: the code SHOULD be capable of being compiled by a C++ compiler.
![](smile.gif)
I hope I have come up with a better description of the problem at hand.
Do you think I need to use SWIG for this purpose and add complexity to the problem?
Maybe I dont understand what SWIG is and hence I dont see the usage of it in this situation. I would appreciate if you would comment on the same,.
Thanks very much for the response.
![](smile.gif)
Much appreciated.
[edited by - hehenoobhehe on October 22, 2003 5:00:40 AM]