HeadGen: C++Builder Template Generator

By: Bob Swart

Abstract: In this article I'll explain the usage of HeadGen, my free C++Builder template header/source generator, first introduced in my article in the C++ Zone on DevX.

My article in the C++ Zone of DevX is about generating C++ class template definitions (template header and implementation (skeleton) definitions) which are often hard to read, let alone to write. You can download and use HeadGen, my source-code generator to produce class template header implementation definitions in .hpp and .cpp files (see source code results).
Usage examples are now available on my website, and will be followed shortly by an article that shows how to turn HeadGen into an add-in Wizard for C++Builder.

In this article I'll explain the usage of HeadGen, my free C++Builder template header/source generator (currently, only the stand-alone executable, but I'm working on an AddIn Wizard version for the C++Builder IDE).

HeadGen can be used to generate a canonical template class definition (with or without ancestor type). A canonical class is minimal (only a few key methods), but still complete and useful. A canonical class contains the default constructor (without an argument), the destructor, a copy constructor, the assignment operator, the compare operator and lastoptionallythe stream operator (always useful when debugging).

The result of HeadGen can be useful (at least to me), since it's not always clear how the syntax for a C++ template definition should be. I've been using it for a number of years (as command-line version), and only recently changed the "interface" into a modern Windows GUI. The next step will be the AddIn Wizard version, so stay tuned for more...


Server Response from: ETNASC01