The public methods should 'not' start with a under score
( _ ). The private methods and members of a class can use under score (
_ ) so that it indicates a private member. Local variables inside a function /
method can use double under score ( __ ) to distinguish it from other
members of the class. The double underscore indicate these are
temporary variables.
All the global variables should start with a ' g_ ' prefix to indicate
these are global. Ex: g_hInst [Global Instance]
All the class member should start with a 'c_' prefix to indicate these
are form class. Ex: c_hWind [window handle]
Functions and class declarations should not use the GNU style of brace
matching ie It should NOT be like this
void tThread::StartThread(){ } I prefer the general way of
matching void tThread::StartThread() { }
The general idea is to have a clearly understandable class structure.
I also like the documentation to be above the class declaration, so
that the IDE will automatically fetch help text for the coder. This
will eventually obviate the need for expensive documentation and it can
easily be updated as and when with modifications and by updates to new
version of the library. Also I will device a scheme by which a link can
be placed inside the documentation to the other files, there by it can be more dynamic.
IDE will generate the help files form the header-files & some additional
documentation files. |