Include only related classes in one file

To keep your class definitions under control and to make life easier for those trying to decipher them, limit each header file to a single class definition or a set of related class definitions. This is a common convention, and a compiler with a load/dump facility removes the penalty for having many small include files rather than a few large ones.

Put only one class implementation in a given source file; declare and implement classes private to the class implementation in the same source file. Name the file after the class, but without the initial T. For example, put the class TContainerView in ContainerView.C. Also, be consistent about case when naming and referring to include files, as some development environments are sensitive to case in filenames.

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker