|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Once you have defined a template class, you can create any number of instances of that class.
You can use template class instances to provide different descriptions of a template, search for different default file names, look in different default directories, and so on. You can affect all these things when calling the template class constructor.
The signature of a template class constructor is always the same:
| Element | Description |
| TplName | The class name you specified when defining the template class |
| name | Whatever name you want to give this instance |
| regTable | The name of a registration table created using the BEGIN/END_REGISTRATION macros (see Creating Document Registration Tables) |
For example, suppose you have the following template class definition:
Now suppose you want to create three instances of this template class:
The code for these instances would look something like this:
Note that, as with any other class, you can create both static and dynamic instances of a document template.