coding style

Eddie Kohler eddietwo at cag.lcs.mit.edu
Fri Mar 26 17:27:23 EST 1999


Hi, just a couple notes on IPB coding style.

1. Please put the following lines at the top of any .cc file, before
ANYTHING else:

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

This will help us if we ever move to Automake.

2. Policy change: I think `PermString name() const' methods should return
"UpperAndLowerCase" not "lower-case-only". Then name()'s result will equal
the class name.

3. INVARIANT: If push(input_id, packet) is called, then packet != 0, so
don't bother checking.

4. REFERENCE COUNTS: There was a bug in the definitions of Tee and
Broadcast. Before you send a packet to multiple places, remember to
increase its reference count.

5. Should we use #pragma interface and #pragma implementation? I'm probably
the only one who even knows what they do!... They may result in
fractionally smaller compile time.

love,
ed



More information about the click mailing list