Package OpenCAGE.GIF

This package includes the Graph InterFace.

Class Edge_Message

Encodes the type of change the model notifies to the display, i.e. (Edge_Created, Edge_Deleted, Edge_Changed)

Class Edge_Model

This is an abstract class representing an edge of a graph. Thus, it holds two Node_Models: a start and an end node.

Operations

public OpenCAGE.GIF.Node_Model Get_Start_Node(void);

Returns the start node of the edge. For the start node this edge is an outgoing edge.

public OpenCAGE.GIF.Node_Model Get_End_Node(void);

Returns the end node of the edge. For the end node this edge is an incoming edge.

public Ada.Strings.Unbounded.Unbounded_String Get_Annotation( Ada.Strings.Unbounded.Unbounded_String Key);

Get a node annotation.

public Set_Annotation( Ada.Strings.Unbounded.Unbounded_String Key, Ada.Strings.Unbounded.Unbounded_String Value);

Set a node annotation. If it exists already, it is updated, else it is created.

public Boolean Get_Annotation( Ada.Strings.Unbounded.Unbounded_String Key);

Get a node annotation.

public Set_Annotation( Ada.Strings.Unbounded.Unbounded_String Key, Boolean Value);

Set a node annotation. If it exists already, it is updated, else it is created.

public Integer Get_Annotation( Ada.Strings.Unbounded.Unbounded_String Key);

Get a node annotation.

public Set_Annotation( Ada.Strings.Unbounded.Unbounded_String Key, Integer Value);

Set a node annotation. If it exists already, it is updated, else it is created.

public FET.Pot_Element Create_Pot_Element(void);

Encapsulate the Edge in a Pot element

public Attach( OpenCAGE.GIF.Edge_Model_Observer Observer);

Attach the given observer to the observer list.

public Detach( OpenCAGE.GIF.Edge_Model_Observer Observer);

Detach the given observer from the observer list.

public OpenCAGE.GIF.OC_ID Get_ID(void);

returns a unique identification for the edge.

Class Edge_Model_Deserializer

extends FET.Deserializer

Operations

public FET.Pot_Element Deserialize( OpenCAGE.General.XML.Node_Ptr XML);

Deserialize a XML-structure to a pot element [This description is adopted from 'FET.Deserializer'.]

Class Edge_Model_Pot_Element

extends FET.Pot_Element

Operations

public OpenCAGE.General.XML.Node_Ptr Serialize(void);

Serializes the content of this Pot_Element into XML [This description is adopted from 'FET.Pot_Element'.]

public OpenCAGE.GIF.Edge_Model Get_Edge_Model(void);

public Set_Edge_Model( OpenCAGE.GIF.Edge_Model Value);

Class Node_Message

Encodes the type of change the model notifies to the display, i.e. (Node_Created, Node_Deleted, Node_Changed)

Class Node_Model

This is an abstract class representing a node of a graph. It stores the incoming and outgoing edges of a node. It also has a list of all its children. All classes representing a kind of graph node have to inherit from Node_Model.

Operations

public OpenCAGE.GIF.Edge_Models_Lists.List Get_Incoming_Edges(void);

A list of all incoming edges.

public OpenCAGE.GIF.Edge_Models_Lists.List Get_Outgoing_Edges(void);

A list of all outgoing edges.

public Boolean Has_Children(void);

Returns true if not Is_Leaf() and Count(Children) > 0, false otherwise.

public Boolean Is_Leaf(void);

Returns true if this node is a leaf, false otherwise.

public OpenCAGE.GIF.Node_Models_Lists.List Get_Children(void);

Returns a list of all children of this node if Is_Leaf() == false, null otherwise.

public OpenCAGE.GIF.Node_Model Get_Parent(void);

returns the parent of the node, null if it has no parent.

public Ada.Strings.Unbounded.Unbounded_String Get_Annotation( Ada.Strings.Unbounded.Unbounded_String Key);

Get a node annotation.

public Set_Annotation( Ada.Strings.Unbounded.Unbounded_String Key, Ada.Strings.Unbounded.Unbounded_String Value);

Set a node annotation. If it exists already, it is updated, else it is created.

public Boolean Get_Annotation( Ada.Strings.Unbounded.Unbounded_String Key);

Get a node annotation.

public Set_Annotation( Ada.Strings.Unbounded.Unbounded_String Key, Boolean Value);

Set a node annotation. If it exists already, it is updated, else it is created.

public Integer Get_Annotation( Ada.Strings.Unbounded.Unbounded_String Key);

Get a node annotation.

public Set_Annotation( Ada.Strings.Unbounded.Unbounded_String Key, Integer Value);

Set a node annotation. If it exists already, it is updated, else it is created.

public Boolean Is_Supported_Action( String Name);

This method returns true if the given action name is supported, i.e. of Get_Action will return an appropriate Action. Otherwise false is returned.

public OpenCAGE.Actions.Action Get_Action( String Name);

This method returns an Action matching the given name. E.g. if you give "Foo" as the name, you will get a Foo_Action. If this action is not supported by the model behind Node_Model it will throw an Unsupported_Action_Exception. So you either get an Action which is a Foo_Action (i.e. you are allowed to cast and you can be sure the cast works) or an exception is raised.

public OpenCAGE.General.String_List.List Get_Attributes(void);

Returns a String_List, which contains all the Attributes within this node

public OpenCAGE.GIF.OC_ID Get_ID(void);

returns a unique identification for the node.

public OpenCAGE.GIF.Node_Model_Pot_Element Create_Pot_Element(void);

Create a pot element with the node contained in the pot element

public Boolean Is_Readonly(void);

Return the read/write status of a node. True = read only False = read and write

public Set_Readonly( Boolean Status);

Sets the read/write status of a node True = read only False = read and write

public Attach( OpenCAGE.GIF.Node_Model_Observer Observer);

Attach the given observer to the observer list.

public Detach( OpenCAGE.GIF.Node_Model_Observer Observer);

Detach the given observer from the observer list.

Class Node_Model_Deserializer

extends FET.Deserializer

Operations

public FET.Pot_Element Deserialize( OpenCAGE.General.XML.Node_Ptr XML);

Deserialize a XML-structure to a pot element [This description is adopted from 'FET.Deserializer'.]

Class Node_Model_Pot_Element

extends FET.Pot_Element

A Pot_Element, which contains a Node_Model

Operations

public OpenCAGE.General.XML.Node_Ptr Serialize(void);

Serializes the content of this Pot_Element into XML [This description is adopted from 'FET.Pot_Element'.]

public Set_Node_Model( OpenCAGE.GIF.Node_Model Node_Model);

public OpenCAGE.GIF.Node_Model Get_Node_Model(void);

Class OC_ID

A unique Id, used to identify every gif object.

Class Edge_Model_Observer

This abstract class is implemented by classes which want to observe Edge_Models

Operations

public Destroying( OpenCAGE.GIF.Edge_Model Edge);

Is called by the observerd edge, when it is asked to destroy itself.

public Changed( OpenCAGE.GIF.Edge_Model Edge);

Is called by the observed edge when it has changed.

Class Node_Model_Observer

This abstract class is implemented by classes which want to observe Node_Models

Operations

public Destroying( OpenCAGE.GIF.Node_Model Old_Node);

Is called by the observed node when it is asked to destroy itself.

public Changed( OpenCAGE.GIF.Node_Model Node);

Is called by the observed node when it has changed.

public Child_Added( OpenCAGE.GIF.Node_Model Node, OpenCAGE.GIF.Node_Model Child_Node);

Is called by the observed node when a child is added.

public Child_Removed( OpenCAGE.GIF.Node_Model Node, OpenCAGE.GIF.Node_Model Child_Node);

Is called by the observed node when a child is removed.

public Incoming_Edge_Added( OpenCAGE.GIF.Node_Model Node, OpenCAGE.GIF.Edge_Model New_Edge);

Is called by the observed node when an incoming edge was added.

public Outgoing_Edge_Added( OpenCAGE.GIF.Node_Model Node, OpenCAGE.GIF.Edge_Model New_Edge);

Is called by the observed node when an outgoing edge was added.

public Incoming_Edge_Removed( OpenCAGE.GIF.Node_Model Node, OpenCAGE.GIF.Edge_Model Old_Edge);

Is called by the observed node when an incoming edge was removed.

public Outgoing_Edge_Removed( OpenCAGE.GIF.Node_Model Node, OpenCAGE.GIF.Edge_Model Old_Edge);

Is called by the observed node when an outgoing edge was removed.