{logo}

February 2001
Volume 19 Number 2

EMBEDDED SYSTEMS

Exception Handling in Embedded C Programs

Yonatan Lehman
The most common way to emulate exceptions in C is through its setjmp/longjmp facility. The approach presented here is less complicated, but with some surprisingly useful features, including a simple form of stack unwinding.

Debugging under GNU/Linux

Randy Zack
Programmers from fields as diverse as enterprise computing to embedded systems are venturing into Linux. If you are one of them, here’s a tool that should be at the top of your download list.

FEATURES

Encapsulating CORBA Components with the Adapter and Bridge Patterns

Patrick May
CORBA hides the details of invoking objects on remote machines. With a little more refactoring, we can hide the details of CORBA as well.

Callbacks Made Easy with the Observer/Mediator Design Patterns

Vladimir Batov
Good software works; great software evolves. Here’s a variation on the Observer pattern that lets you update your code base with ease.

C/C++ CONTRIBUTING EDITORS

The New C: Integers, Part 3

Randy Meyers
At first glance, C99’s new integral types seem to threaten its portability. But a few added headers and typedefs improve the outlook dramatically.

Common Knowledge: Polymorphic Function Objects

Steve Dewhurst
It takes lots of skill, and maybe a design pattern or two, to turn a function pointer into a thing of beauty.

STL & Generic Programming: STL Containers

Thomas Becker
Why does the Standard C++ library provide so many kinds of containers? To enable tradeoffs in efficiency in their infinite variety of uses.

C++ Made Easier: Programs That Work by Accident

Andrew Koenig & Barbara E. Moo
Avoiding undefined behavior is critically important in C++ programming. The authors show us some ways that don’t require memorizing the entire C++ Standard.

Uncaught Exceptions: Fuzzy Math

Bobby Schmidt
Compared to certain flawed political processes, computing processes yield the same answers with remarkable consistency. Now we just need to figure out why they’re wrong.

DEPARTMENTS

Editor’s Forum

New Products

We Have Mail

C++ EXPERTS ON THE WEB

In this new, web-only component of CUJ, we continue publication of the columns that were popular in the former C++ Report magazine. The following articles are featured on the CUJ website this month:

"Generic<Programming>: volatile — The Multithreaded Programmer’s Best Friend"

by Andrei Alexandrescu
Andrei shows how to make the compiler work for you to help detect race conditions. A seldom-discussed keyword plays a key role.

"The Standard Librarian: User-Defined Format Flags"

by Matt Austern
Both C and C++ enable users to control output formatting for primitive types. With C++ you can format user-defined types as well, by defining your own format flags.

"Conversations: Access Restrictions"

by Jim Hyslop and Herb Sutter
If there are any good reasons to make data members public, efficiency probably isn’t one of them. Here’s a convincing explanation as to why, and some data to back it up.

"Effective Standard C++ Library: for_each vs. transform

by Angelika Langer and Klaus Kreft
Superficial similarities aside, these two algorithms have very different purposes. Understanding those purposes can save you lots of trouble down the road.

"Engineering Notebook: An Extreme Programming Episode"

by Robert C. Martin and Robert S. Koss
Who better to demonstrate pair programming than a pair of Bobs? Read this installment to find out what it’s really like.