OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Step 4: Creating a document list

The registration tables hold information about your application and its documents, but they are static.

They don't do anything with that information. To register the information with the system, an application must pass the structures to an object that know how to use them. That object is the registrar, which records any necessary information in the system registration database. In a Doc/View application, the registrar examines the list of document templates to find each document registration structure. A non-Doc/View application doesn't have document templates, so it uses TRegLink instead to create a linked list of all its document registration tables.

static TRegLink* RegLinkHead;

RegLinkHead points to the first node of the linked list. ScribbleLink is a node in the linked list. The TRegLink constructor follows RegLinkHead to the end of the list and appends the new node. Each node contains a pointer to a document registration structure. In OWLOCF2, the list contains only one node because the server creates only one type of document. The node points to DocReg.

OWLOCF2 declares RegLinkHead as a static variable because it is used in several parts of the code, as the following sections explain.