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

Rule:  GEN#002

Synopsis:Company C++ code shall be clearly separated from 3rd party code
Severity Level:9


Maintain a clear separation between in-house developed code and 3rd party source files, which includes generated code. Note that this may require explicit attention in the design phase. In general, interfaces and interoperability with 3rd party code shall be clearly documented in the design.

It is allowed to use interfaces defined by header files of 3rd party libraries directly in company C++ code. An example is the use of standard C++ libraries. It is not obligatory to hide such an interface by means of a company specific C++ wrapper, although there may be good reasons, such as improved portability, to do so in specific cases.

If possible, C++ code that is maintained by the company, should not be located 'embedded' in generated 3rd party code. In any case, files containing such mixed code should be clearly separated from regular company C++ files. Such mixed files will almost certainly contain several coding standard violations, and the relevant design document shall, identify the violated rules and specify alternative rules that do apply. The documentation should also specify which design patterns are used to separate and localize the parts of the implementation that are partly generated and therefore contains coding standard violations.