Case Study
A software company had a complex and powerful C++ data library. It took developers a long time just to create a C++ class for a single database table just because of the amount of repetitive code required to create a class from scratch. Some developers tried taking shortcuts by copying existing classes, but that introduced errors occasionally because of the different ways the classes were written.
The solution to this problem was a simple code generator written in Java. Given a database table and a list of column-name-to-field-name mappings, the generator created the appropriate C++ classes. After the base class was generated, developers added additional methods to the generated code. The code generator was used as a one-shot time ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access