OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Associating Document and View Classes

A document class is associated with its view class (or classes) by a document template.

Document templates are created in two steps:

  1. Define a template class that associates a document class with a view class.
  2. Instantiate a template object from a defined class.

The difference between these two steps is important. After you have defined a template class, you can create any number of instances of that template class. Each template associates only a document class and a view class. Each instance has a name, a default file extension, a directory, flags, and file filters. Thus you could provide a single template class that associates a document with a view. You could then provide a number of different instances of that template class, where each instance handles files in a different default directory, with different extensions, and so on, still using the same document and view classes.

See Also