Automatic header generation for C++

thp@cs.ucr.edu
11 Mar 2002 02:14:58 -0500

          From comp.compilers

Related articles
Automatic header generation for C++ thp@cs.ucr.edu (2002-03-11)
Re: Automatic header generation for C++ michael_spencer@btclick.com (Michael Spencer) (2002-03-17)
| List of all articles for this month |
From: thp@cs.ucr.edu
Newsgroups: comp.compilers
Date: 11 Mar 2002 02:14:58 -0500
Organization: University of California, Riverside
Keywords: C++
Posted-Date: 11 Mar 2002 02:14:58 EST

I'm interested in obtaining a tool that takes a C++ source file
(.cc-files) and generates the corresponding header file (.h-file)
including:


    - all #include directives from the .cc-file.
    - all function prototypes from the .cc-file.
    - the prototype of each function defined in the .cc-file.
    - all extern declarations from the .cc-file.
    - an extern declaration for each data item defined in the .cc-file.
    - all typedef's from the .cc-file
    - all declarations of struct or class types in the .cc-file
    - whatever else the .h-file ought to have.


In addition it would have to have code to adjust the line numbers to
correspond to those of widget.cc, so that if there were an error in
compiling the .h-file, the programmer could edit the corresponding
line of the .cc-file.


I have an awk script for doing some of this, but it's ten years out of
date and never worked very well in the first place. Does anyone know
of such a tool, hopefully a free one.


Thanks,
Tom Payne


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.