• Increase font size
  • Default font size
  • Decrease font size

API Diff

  Tuesday, October 26th, 2010

API Diff is a program that I wrote to let you compare two different versions of an API. The aim was to provide a tool that would simplify API reviews and to document everything that changed in a new version of your API.

It uses a C++ parser to provide specific support for C and C++ APIs, but can also handle other languages via a plain-text diff engine. It also lets you view all comment changes so that you can review any new documentation.  You can view changes in a side-by-side visual format and generate a report on everything that changed. The program is available for free for Windows, Mac OS X, and Linux, with additional functionality available for a small license fee. For more details, see:


Doxygen

  Thursday, September 9th, 2010

There are many tools out there that will create API documentation automatically from the comments in your code. Doxygen is one that I have used a lot and also like a lot. It can extract documentation from many different languages, including C and C++, it works on Windows, Mac OS X, and Linux, and it has a huge degree of configurability. It’s also open source. Check it out for your API reference documentation needs.


Unit Testing Frameworks

  Thursday, September 9th, 2010

A unit test is a white-box testing technique that a developer performs. White-box means that you write the tests with knowledge of the implementation of the API. There are many frameworks out there that help you write, maintain, and run unit tests for your code. Most of these are based upon the J-Unit style of unit testing. Wikipedia offers a good categorization of unit test frameworks that are available for C and C++. See:


Lakos’ Analysis Tools

  Wednesday, September 8th, 2010

John Lakos wrote the book Large-Scale C++ Software Design, in which he describes many issues of developing C++ software for large projects. As part of this book, he also provided a number of utilities to manage dependencies in a C++ project. This include:

  • adep: creates aliases to group files into cohesive components
  • cdep: extracts compile-time dependencies from several files
  • ldep: analyzes link-time dependencies among various components

These utilities were originally written in the mid-1990s, though some engineers have attempted to make these utilities work with modern compilers. Here are some links if you’re interested in looking into these:


ABOUT THIS SITE

An Application Programming Interface (API) provides a logical interface to a piece of software and hides its internal details. This website is dedicated to a book on designing APIs for C++ and includes articles and links on API development.
 

SOURCE CODE

The book is accompanied by a source code package that contains many of the examples in the text. Download it for free.
 

OTHER BOOKS

Dr. Reddy has also published a computer graphics book called Level of Detail for 3D Graphics. Check it out too!.
 
Copyright (c) 2024 Martin Reddy. All rights reserved. Login