Package OpenCAGE.GIF.Factories.Graph_Factory

The graph factory classes.

Class Graph_Factory

throws No_Specific_Model_Factory_Error , No_Graph_File_Opened_Error .

This is a class used to open a file that stores a graph system. It hides a factories and gives you a simple interface to open files and building graph windows. Every Specific_Model_Factory, which OpenCAGE has to know (and therefore every file format) has to be registered to this factory


private OpenCAGE.GIF.Factories.Graph_Factory.Specific_Model_Factories_Lists.List Specific_Model_Factories 

A list of Specific_Model_Factories which are registered in the system. These will be checked one by one until a appropriate is found.

private OpenCAGE.GUI.Factories.Displays.Display_Factory Display_Factory 

The display factory of the last opened file. It is returned by the Specific_Model_Factory.

private OpenCAGE.Data.Data Oc_Data 

The global Oc_Data object.

private OpenCAGE.GIF.Factories.Graph_Factory.Graph_Factory_Observers_Lists.List Observers 

a list of observers that observe the Graph_Factory


public OpenCAGE.GIF.Root_Node_Models.Root_Node_Model Open_File( Ada.Strings.Unbounded.Unbounded_String Filename);

Open the file specified by the filename. If no fitting Specific_Model_Factory is found, a exception is thrown.

public OpenCAGE.GUI.Factories.Displays.Display_Factory Get_Display_Factory(void);

Returns a Display_Factory for the last opended Filename. Throws a exception, if no file was opened before.

public Register_Factory( OpenCAGE.GIF.Factories.Specific_Model_Factory Specific_Model_Factory, OpenCAGE.GUI.Factories.Displays.Display_Factory Display_Factory);

Register a Specific_Model_Factory, which can handle a specific file type. Registering the same factories more than once is allowed. In this case the first matching factory is used (in the order they were registered).

public Boolean Is_Openable( Ada.Strings.Unbounded.Unbounded_String Filename);

Returns true if any of the registered Specific_Model_Factories can open the file, false otherwise.

public Attach( OpenCAGE.GIF.Factories.Graph_Factory.Graph_Factory_Observer Observer);

attach the given observer to the observer list

public Detach( OpenCAGE.GIF.Factories.Graph_Factory.Graph_Factory_Observer Observer);

detach the given observer from the observer list

public Notify( OpenCAGE.GIF.Factories.Graph_Factory.Graph_Factory_Message Message, OpenCAGE.GIF.Node_Model Model);

Notify the attached observers of something

Class Graph_Factory_Message

The messages a Graph_Factory can omit: (Opened)

Class Graph_Factory_Observer

an abstract observer that observes the graph factory.


private OpenCAGE.GIF.Factories.Graph_Factory.Graph_Factory Model 

the observed graph factory


public Changed( OpenCAGE.GIF.Factories.Graph_Factory.Graph_Factory_Message Message, OpenCAGE.GIF.Node_Model Model);

is called by the graph factory when something happened

Class Specific_Model_Factory_Display_Factory_Container

contains a pair of objects: a specific model factory and a display factory.