RFG to OpenCAGE Model Events

Figure 8-2. Observers listening to the RFG

Observers listening to the RFG

The objects in the RFG (RFG, View, Node_Ptr, and Edge_Ptr) have both an association to the observer of the superior object and to the observer of themselves.

The Node_Observer and the Edge_Observer take a view as a parameter in every message. This is due to the fact that in the RFG there is only one object for a node or an edge. If an object is visible in different views, the proper entries are made in a table. In opposition to this, the OpenCAGE Model has different objects for each view. E.g. to different Node_Model objects in OpenCAGE have an observer attached to the same Node_Ptr in the RFG. If this Node_Ptr sends a message, the Node_Model in OpenCAGE has to decide by the view whether it is affected by the message or not.

It is possible to turn off the events in the RFG. This is important e.g. when an analysis is running. Due to performance reasons, OpenCAGE only gets the resulting view from an analysis by turning off node and edge events.