Package OpenCAGE.GIF.RFG.Views

Class RFG_View_Node_Model

extends OpenCAGE.GIF.Typed.Typed_Node_Model

This class represents Views. Thus, it holds a list of RFG_Node_Models.

Attributes

private OpenCAGE.GIF.Node_Models_Lists.List Nodes 

private RFGs.RFG The_Rfg 

Set this BEFORE The_View.

private RFGs.View The_View 

The_RFG has to be set BEFORE this is set.

private OpenCAGE.GIF.Node_Models_Lists.List Children 

private Edge_Tags.Tag Hierarchy_Edge 

The Tag of an edge type, which is considerd as hierarchical edge in the context of this view. You can get this string by calling RFGs.Get_Tag(Instance_of_Edge_Type_you_want_to_be_the_hierarchical_edge).

private OpenCAGE.GIF.RFG.Type_Infos.Generic_RFG_Type_Info Type_Info 

private OpenCAGE.GIF.RFG.Views.Node_Model_Hash.Mapping Node_Hash 

No we dont create a Node_Model for a RFGs.Node_Ptr twice

private OpenCAGE.GIF.RFG.Views.Edge_Model_Hash.Mapping Edge_Hash 

No we dont create a Edge_Model for a RFGs.Edge_Ptr twice

private OpenCAGE.GIF.OC_ID ID 

private OpenCAGE.GIF.RFG.Views.RFG_View_Observer RFG_Observer 

private Boolean View_Already_Set 

private Boolean Children_Read 

This flag indicates, if the node has already read his children (Get_Children has been called)

private OpenCAGE.GIF.RFG.Views.Node_Model_Observer Node_Observer 

Operations

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

A list of all incoming edges. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

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

A list of all outgoing edges. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

public Boolean Has_Children(void);

Returns true if not Is_Leaf() and Count(Children) > 0, false otherwise. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

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

Get a node annotation. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

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

Get a node annotation. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

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

Get a node annotation. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

public OpenCAGE.GIF.RFG.Views.RFG_View_Node_Model Create(void);

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

public OpenCAGE.GIF.Type_Infos.Type_Info Get_Type_Info(void);

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

Returns a list of attributes grouped to this view

public Boolean Is_Bound( RFGs.Node_Ptr Node);

Checks, if for this Node_Ptr a RFG_Node_Model does already exist. Note: Only for internal use (i.e. protected)

public Boolean Is_Bound( RFGs.Edge_Ptr Edge);

Checks, if for this Edge_Ptr a RFG_Edge_Model does already exist. Note: Only for internal use (i.e. protected)

public Bind_Node( RFGs.Node_Ptr Node, OpenCAGE.GIF.Node_Model NM);

Note: Only for internal use (aka: this method is proctected)

public Bind_Edge( RFGs.Edge_Ptr Edge, OpenCAGE.GIF.Edge_Model EM);

Note: Only for internal use (aka: this method is proctected)

public Unbind_Node( RFGs.Node_Ptr Node);

Note: Only for internal use (aka: this method is proctected)

public Unbind_Edge( RFGs.Edge_Ptr Edge);

Note: Only for internal use (aka: this method is proctected)

public OpenCAGE.GIF.Node_Model Retrieve_Node( RFGs.Node_Ptr Key);

Retrieves the value for this key. This method is protected, i.e. only RFG_Node_Model should call it.

public OpenCAGE.GIF.Edge_Model Retrieve_Edge( RFGs.Edge_Ptr Key);

Retrieves the value for this key. This method is protected, i.e. only RFG_Node_Model should call it.

public OpenCAGE.GIF.Node_Model_Pot_Element Create_Pot_Element(void);

Create a pot element with the node contained in the pot element [This description is adopted from 'OpenCAGE.GIF.Node_Model'.]

public Set_Readonly( Boolean Status);

Set the new read/write status of this view

public Boolean Is_Readonly(void);

Get the read/write status of this view. True = read only, False = read and write

public Add_Child( OpenCAGE.GIF.Node_Model Child);

Adds a children from the view. Thanks to Ada we are not allowed to enforce you to give us only rfg node models. But you really should not try to give us anything else.

public Remove_Child( OpenCAGE.GIF.Node_Model Child);

Removes a children from the view. Thanks to Ada we are not allowed to enforce you to give us only rfg node models. But you really should not try to give us anything else.

public Boolean Is_Hierarchy_Edge( RFGs.Edge_Ptr Edge, OpenCAGE.GIF.RFG.Views.RFG_View_Node_Model View);

returns true if the given edge is an hierarchical edge

public Boolean Has_Outgoing_Hierarchy_Edges( RFGs.Node_Ptr Node, OpenCAGE.GIF.RFG.Views.RFG_View_Node_Model View);

returns true if the given node has at least one outgoing hierarchical edge

public Natural Count_Outgoing_Hierarchy_Edges( RFGs.Node_Ptr Node, OpenCAGE.GIF.RFG.Views.RFG_View_Node_Model View);

Returns the number of outgoing edges

Class RFG_View_Observer

extends RFGs.View_Observer

Attributes

private OpenCAGE.GIF.RFG.Views.RFG_View_Node_Model RFG_View_Node_Model 

Operations

public Destroying( RFGs.View Old_View);

This message is send if the view is destroying itself. [This description is adopted from 'RFGs.View_Observer'.]

public Changed( RFGs.View Changed_View);

This message is sent if the attributes (e.g. read-only) of the view have been changed. [This description is adopted from 'RFGs.View_Observer'.]

public Child_Added( RFGs.View View, RFGs.Node_Ptr Child_Node);

This message is sent if a node has been added to the view. [This description is adopted from 'RFGs.View_Observer'.]

Class Node_Model_Observer

extends OpenCAGE.GIF.Node_Model_Observer

Only listens to Destroying.

Attributes

private OpenCAGE.GIF.RFG.Views.RFG_View_Node_Model RFG_View_Node_Model 

Operations

public Destroying( OpenCAGE.GIF.Node_Model Old_Node);

Is called by the observed node when it is asked to destroy itself. [This description is adopted from 'OpenCAGE.GIF.Node_Model_Observer'.]

public Changed( OpenCAGE.GIF.Node_Model Node);

Is called by the observed node when it has changed. [This description is adopted from 'OpenCAGE.GIF.Node_Model_Observer'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model_Observer'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model_Observer'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model_Observer'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model_Observer'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model_Observer'.]

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. [This description is adopted from 'OpenCAGE.GIF.Node_Model_Observer'.]