Cpp Coding Standards/Principles

From Apache OpenOffice Wiki
Jump to: navigation, search

Meta Rules

This topic contains high level rules - or more general guidelines - that are good advice, but may be more difficult to check or decide in some cases. Aspects of them may be implemented by many of the other standards rules.


Summary

KeepItSimple

Correctness, simplicity and clarity first.

MinimizeDependencies

Minimize dependencies.

HideInformation

Hide as much information as you can.

MinimizeChangeEffort

Design orthogonally. Every change of a single aspect should need a code change only in one location.

ConsistentErrorHandling

Establish a rational error handling policy for the OpenOffice.org in general.

FacilitateTesting

Write code such that unit tests are possible. For complex data structures provide possibilities to stream them out into a human understandable form.


Explanations


Personal tools