Introduction
stubgen is a C++ development tool that keeps code files in sync with their associated headers. When it finds a member function declaration in a header file that doesn’t have a corresponding implementation, it creates an empty skeleton with descriptive comment headers.
stubgen has several options, but this brief example should give you an idea of what it can do. Suppose you have the following header file Point.h:
class Point { public: Point(int x, int y); void addTo(const Point& other); int xValue, yValue; };
Running stubgen -s Point.h would produce the following file:
/*********************************************** * AUTHOR: Michael J. Radwin * FILE: Point.cpp * DATE: Mon Apr 20 17:39:05 1998 * DESCR: ***********************************************/ #include "Point.h" /* * Method: Point::Point() * Descr: */ Point::Point(int x, int y) { } /* * Method: Point::addTo() * Descr: */ void Point::addTo(const Point& other) { }
Documentation
building, installation instructions, and acknowledgements
detailed descriptions, examples
a listing of changes made on various versions
terms and conditions for copying, distribution and modification
Download Source and Win32 executable
https://www.radwin.org/michael/projects/stubgen/dist/
I’ve successfully built stubgen on the following platforms, using the GNU tools make, gcc, bison, and flex:
- SPARC Solaris (2.5 and 2.6)
- SunOS 4.1.3
- SGI IRIX 5.3
- RS6000 AIX 3.2
- FreeBSD 2.2
- MS Windows NT 4.0 (using GNU bison/flex and MSVC++ 5.0)
- BeOS R5
Copyright
Copyright © 2011 Michael J. Radwin