This is the abstract superclass of all conditions. Each condition class encapsulates a particular condition of the opencage model, e.g. that at least one node is selected. The current state of the condition (true or false) can be asked for by Get_Result. The condition caches its result in order to optimize the reply time. The Invalid operation is used to tell the condition that it has to recompute its result when Get_Result is called the next time.
private Boolean Result
Caches the computed result.
private Boolean Validity
Tells whether the Result-Value is up-to-date or has to be recomputed.
private OpenCAGE.Controller.Condition.Cond_Observers_Lists.List Cond_Observer_List
Holds the list of all registered Condition_Observers.
Returns the result of the condition. Only recomputes the result by using the Compute_Result operation if it has not changed since the last computation.
Tells the condition that it has to recompute its result.
Registers a Condition_Observer at the Condition. The registered observer will be notified whenever the result of the Condition object has become invalid.
Computes the result of the condition. Must be implemented by subclasses
Notifies all observers that something has changed.
The Condition_Factory is the abstract superclass of all condition factory classes. Each of them is responsible for building a condition class when it is requested by using the operation Create_Condition. The condition factory class therefore knows all dependancies of the corresponding condition in order to initialize it appropriately.
private OpenCAGE.Data.Data Oc_Data
This object holds all data for one instance of OpenCAGE (actual model, lists of command factories, ...)
This is the abstract super class of all classes that observe Conditions. If a Command Object changes its state, it notifies all registered Command Observers.