omniORB Coding Conventions
This page describes the coding conventions for code in the omniORB and omniORBpy distributions. Your contributions to omniORB stand a much better chance of being integrated if they follow these conventions.
The basic rule is to follow the layout of the existing code. The rules are not set in stone, and there are a number of exceptions to the general patterns.
C++ Conventions
Lines limited to 80 characters.
Two spaces for indentation.
Tab is equivalent to 8 spaces.
Emacs C++-mode style braces:
for (i=0; i<5; i++) { cout << i << endl; }
As an exception, function definitions may have the opening brace on a new line.
No STL. It is not available everywhere omniORB is used, and there are quality of implementation issues with it.
Private Data members of classes are prefixed pd_.
In CORBA standard interfaces, non-portable extensions are prefixed NP_.
Functions that are "private" to an implementation but can not be C++ private are prefixed PR_.
Comments are prefixed //. Long comments should have line breaks before column 80; each line prefixed with //. (Don't use /* */)
Python conventions
Lines limited to 80 characters.
Four spaces for indentation.
No tabs.
