Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Objective Chart User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

12.8 Communication Document (ComDoc) System

The Communication Document (ComDoc) system and the Objective Chart graphing system are independent of each other. Charting applications do not need to use ComDocs (or any other document). And ComDocs can be used to create and link documents of any type.

The ComDoc system adds a new dimension to MDI applications. A ComDoc can invoke child documents and keep those documents updated whenever changes occur to the parent document. The child can also update the parent document.

For example, a menu command handler for an Objective Grid application can create a second document based on Objective Chart to plot a subset of its data. Any subsequent changes to the Grid data are immediately reflected in the Chart. In addition, data items in the Chart can be dragged to new values that are used to update the Grid.

The ComDoc system modifies the MFC document architecture to makes it possible to perform the following actions:

See Chapter 20, "Communication Document System," for a more involved discussion of this subject.

12.8.1 Communication Document Classes

Two classes, SECComDoc and SECDocManager, implement the general ComDoc system. A third class, CGraphDoc, is derived from SECComDoc to provide functions for communicating data related to charts.

The ComDoc system is described in more detail in Chapter 20, "Communication Document System."

12.8.1.1 SECComDoc

SECComDoc extends the standard MFC CDocument class to support communication between linked documents. It maintains as list of linked documents and a pointer to its parent document, if it is a child document.

SECComDoc also includes several functions that enable documents to pass messages to one another. SECComDoc defines the format of these messages, but the meaning and functions that the messages transmit are left open.

12.8.1.2 CGraphDoc

CGraphDoc is a special derivation of the SECComDoc class that handles document linking. It contains the SRGraph data member, m_Graph, which stores the chart data. This document type is a partner to the SRGraphView view class. It also handles SRGraph serialization.

CGraphDoc also defines several message codes to pass information related to chart data values, annotations, and scope.

12.8.1.3 SECDocManager

This derivation of the standard CDocManager class has special functions to facilitate the document linking process. Your applications should use this SECDocManager class instead of the CDocManager if you want to enable document linking.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.