Package OpenCAGE.Controller.Pipe

This package contains the pipe.

Class Command_Pipeline

throws Pipeline_Has_No_Segments .

The Command_Pipeline is used to execute Commands. At Initalization stage, Pipe_Segments are added to the Command_Pipeline in a particular order. Pipe_Segments can be added, removed or inserted at a particular place in the Command_Pipeline at any time. During programm execution, the Command_Pipeline takes Command Objects. These are given successively to the Pipe_Segments.


private OpenCAGE.Controller.Pipe.Commands_Lists.List Master_In_Pile 

Stores the Commands currently waiting to be run by the Command_Pipeline.

private OpenCAGE.Controller.Pipe.Segments_Dyn_Arrays.D_Array_Ptr Segments 

Dynamic Array that stores the Pipe_Segments.

private OpenCAGE.Controller.Pipe.Commands_Lists.List Command_Catchment_Bassin 

Stores the commands after they left the command pipe until the command is finished. Then the command is destroyed.

private Boolean Command_In_Pipe 

If a command is currently running through the pipe.


public Add_Pipe_Segment( OpenCAGE.Controller.Pipe_Segments.Pipe_Segment Segment);

Adds a Pipe_Segment to the end of the Command_Pipeline

Postcondition: Pipe_Segment is added to the end of the Command_Pipeline.

public Insert_Pipe_Segment( Integer Index, Integer Segment);

Inserts a Pipe_Segment at a particular place. All Pipe_Segments beyond this place are shifted.

Postcondition: The Pipe_Segment is added at the given index to the list.

public Take( OpenCAGE.Controller.Command.Command Command);

Takes a Command Object. Either it starts passing it to the Pipe Segments immediately or it puts it into th MIP, where it takes it out as soon as possible.

Postcondition: The Command Object is received and executed as soon as possible.

public Remove( OpenCAGE.Controller.Pipe_Segments.Pipe_Segment Segment);

Removes a Pipe_Segment from the Command_Pipeline.

Postcondition: The Pipe_Segment is removed from the Command_Pipeline.