Coding style: Add a comment on Aggregation vs Inheritance

Change-Id: Ied68af7f63e34a05a087b80be0f219f9ccd4e8eb
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
This commit is contained in:
hjk
2014-02-13 14:28:55 +01:00
parent f844ab4c0b
commit 52a903112a

View File

@@ -893,6 +893,16 @@
Suddenly, QList symbols are exported from two libraries which results in a
clash.
\section2 Inheritance Versus Aggregation
\list
\li Use inheritance if there is a clear \e{is-a} relation.
\li Use aggregation for re-use of orthogonal building blocks.
\li Prefer aggregation over inheritance if there is a choice.
\endlist
\section2 Conventions for Public Header Files
Our public header files have to survive the strict settings of