On Tuesday 26 June 2007 04:40, Erik Johansson wrote: > In the erijo-dev branch it's as simple as make doxy. This is also how > it will work in newapi unless someone else thinks otherwise.
I usually do make docs, but doxy is fine too. Here are a few more suggestions that I could think (with some help from C++ Coding Standards - 101 Rules, Guidelines, And Best Practices) of for coding style: Input parameters should obey the following points: * Always make all pointers or references to input-only parameters const * If the input-only parameter is a primitive type (char, int, etc) or a value object that is cheap to copy, pass it by value. * Other user-defined types should be passed by reference to const. * If the function needs to have its own copy of the argument, pass it by value instead of reference. Output or input/output parameters: * Prefer passing by (smart) pointer if the argument is optional (so callers can pass null as a "not available" or "don't care" value) or if the function stores a copy of the pointer or otherwise manipulates ownership of the argument. * Prefer passing by reference if the argument is required and the function won't store a pointer to it or otherwise affect its ownership. This states that the argument is required and makes the caller responsible for providing a valid object. * Don't use varargs. We are currently using it in ICQUser::usprintf(). We should change how usprintf works. Which leads to the next point... * Don't make use of functions that use varargs, such as sprintf, printf, etc functions * Always initialize variables * Make use of exceptions for error reporting * Throw exceptions by value, catch them by const reference And here is one last one that is a good practice, what do you guys think? * Use STL and algorithms instead of self-made loops (use boost::lambda as necessary) Jon -- ________________________________________________________ Jon Keating ICQ: 16325723 [EMAIL PROTECTED] MSN: [EMAIL PROTECTED] http://www.licq.org GPG: 2290A71F http://www.thejon.org HOME: Minamiashigara, Japan
