2.2 CObject Services

The CObject base class provides the following useful services to objects of its derived classes:

Object persistence

Object diagnostics

Run-time class information

Compatibility with selected collection classes

Some of these services are available only if you use certain macros in derived class declarations and implementations. In order to make use of the services listed above, you should seriously consider deriving most of your nontrivial classes from CObject. Many of the Microsoft Foundation classes are so derived.

Even though CObject is not a true “abstract” base class, you are advised not to construct objects of this class.