Contains Command and Command_Factory that implement opening a graph.
extends OpenCAGE.Controller.Command.Abstract_Command
throws Cannot_Open_Error .
This Command opens a graph.
private OpenCAGE.GIF.Factories.Graph_Factory.Graph_Factory Graph_Factory |
private Ada.Strings.Unbounded.Unbounded_String File_Name |
private OpenCAGE.Dialogs.File_Dialogs.File_Dialog Dialog |
Executes the Command. May raise Illegal_State_Exception if precondition is not met, i.e. if the state is not "Collect_Data, Done". [This description is adopted from 'OpenCAGE.Controller.Command.Command'.]
Precondition: Collect_Data has been performed before and Execute is called the first time. [This precondition is adopted from 'OpenCAGE.Controller.Command.Command'.]
Collects the data. It simply calls Start_Collect_Data, Do_Collect_Data and End_Collect_Data. [This description is adopted from 'OpenCAGE.Controller.Command.Abstract_Command'.]
Precondition: Initialization completed and Collect_Data was not called before. [This precondition is adopted from 'OpenCAGE.Controller.Command.Command'.]
Postcondition: The Command knows the data necessary for its execution. [This postcondition is adopted from 'OpenCAGE.Controller.Command.Command'.]
Returns a string that tells what the Command does in a human readable format. This operation is used for debugging. [This description is adopted from 'OpenCAGE.Controller.Command.Command'.]
Returns the name of the Command. This operation is used for writing the script. [This description is adopted from 'OpenCAGE.Controller.Command.Command'.]
extends OpenCAGE.Controller.Command.Abstract_Command_Factory
This Command Factory builds a Command that opens a graph.
private OpenCAGE.GIF.Factories.Graph_Factory.Graph_Factory Graph_Factory |
Creates a new command object and initializes it with the given data source. The factory may add other data sources (e.g. dialogs) to the command. The factory may (but is not required to) check if the given data source contains all data required. It is recommanded to first check with Can_Excecute if the created command will get all data required. [This description is adopted from 'OpenCAGE.Controller.Command.Command_Factory'.]
Returns the name of the command this factory creates. [This description is adopted from 'OpenCAGE.Controller.Command.Command_Factory'.]
Postcondition: Nothing is changed. [This postcondition is adopted from 'OpenCAGE.Controller.Command.Command_Factory'.]
Computes all necessary conditions and tells whether the Command is executable or not. Probably the Command_Factory needs a data_source first. [This description is adopted from 'OpenCAGE.Controller.Command.Command_Factory'.]