TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C++ Coding Standard

Rule:  OOP#016

This rule is Obsolete
Synopsis:Specify functions using preconditions, postconditions, exceptions; specify classes using invariants
Severity Level:9
Category:Object Oriented Programming


The specifications are described in the same way for both free and all member functions.

All these entries shall be explicitly mentioned, even if they are empty. Hence, do not write something like "...", but specify "none" in case an entry is empty.

Note that function parameters should not be classified as 'In', 'Out', or 'In-Out': these terms are not needed, nor well defined in C++. Using these terms tries to impose a different programming model on the C++ language. In C++, these terms do not add much information to the argument's type declaration. Each argument's type declaration specifies whether the argument is passed by reference (say, In or Out) or by value (say, In), and its const specifiers determine if the (dereferenced) argument is a constant to the function. The preconditions shall specify any requirements on the parameter values on entry.

Literature References:
ISC++ Rec 10.6