fluxbox/doc/Coding_style
2002-01-10 12:56:07 +00:00

54 lines
1.2 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The coding style is almost the same as i blackbox.
Instead of 2 spaces there is tab.
It might look strange now in some places, that is because
the code hasnt been "translated" to tab 100% yet.
Use a tab size of 2 and you will be fine.
if-statements:
if ( stuff )
function(stuff, more stuff,
more, even more);
else
morefunction( stuff, more stuff
stuff,
stuff,
stuff);
if the functionline needs to be split up, like above, right after an if-statement
use { and }, so its clear when the if-statement ends.
It should look like this
if ( stuff ) {
function(stuff, more stuff,
more, even more);
} else {
morefunction( stuff, more stuff
stuff,
stuff,
stuff);
}
The include guards:
_FILENAME_HH_
Function comments:
//------------ function name --------
// This do that and that
// Returns this on success else
// this on failure.
// TODO: if there is something to do.
//-----------------------------------
type classname::function(...) {
}
enums must be in uppercase letters:
enum {WHITE, RED, BLUE};
Class data members are prefixed by m_
Class member function will be organized accordning to creator,
manipulator and accessor categories.