cppannotations/annotations/yo/classes/composition.yo
Frank B. Brokken 777b182edd Moved all files but 'excluded', 'sf', and 'sourcetar' to ./annotations
This allowed me to standardize the sourcetar and sf/* scripts: the base
    directory (containing ./git) is now empty, except for maintenance scripts,
    while the source files and build scripts of the annotations are stored in
    a subdirectory of their own.
2013-05-29 20:44:08 +02:00

7 lines
402 B
Text

In the class tt(Person) objects are used as data members. This construction
technique is called emi(composition).
Composition is neither extraordinary nor bf(C++) specific: in bf(C)
a tt(struct) or tt(union) field is commonly used in other compound types. In
bf(C++) it requires some special thought as their initialization sometimes is
subject to restrictions, as discussed in the next few sections.