Difference between revisions of "Template:ListEdges"

From AtlasWiki
Jump to: navigation, search
(avoid printing inherited edge table headers unless there are some inherited edges, add "inherited in/out edges" headers)
(Now lists inherited edges if a "parents" property is given a comma-separated list of all parents (intermediate work done at ListEdgesWIP))
Line 27: Line 27:
 
}}<noinclude><!--
 
}}<noinclude><!--
  
If we were given inheritance information, discover and list the inherited edges as well...if there are any inherited edges.
+
If we were given inheritance information, discover and list the inherited edges as well.
  
--></noinclude>{{#if:{{{parents|}}}|{{#arraydefine:parents|{{{parents}}}|,|}}{{#if:{{#arrayprint:parents||@@@@|{{InheritEdgesTo|@@@@}}}}|
+
--></noinclude>{{#if:{{{parents|}}}|{{#arraydefine:parents|{{{parents}}}|,|}}
 
{{{!}} class="xcsgtable"
 
{{{!}} class="xcsgtable"
{{!}}-
 
! colspan="5" {{!}} Inherited In Edges
 
 
{{!}}-
 
{{!}}-
 
! Inherited From !! In Edge  !! Predecessor (Comes From) !! Multiplicity !! Description
 
! Inherited From !! In Edge  !! Predecessor (Comes From) !! Multiplicity !! Description
 
{{#arrayprint:parents||@@@@|&#32;
 
{{#arrayprint:parents||@@@@|&#32;
 
{{InheritEdgesTo|@@@@}}}}
 
{{InheritEdgesTo|@@@@}}}}
{{!}}} }} }}<noinclude><!--
+
{{!}}} }}<noinclude><!--
  
 
Next we get the out edges:
 
Next we get the out edges:
Line 68: Line 66:
 
And the inherited out edges table:
 
And the inherited out edges table:
  
--></noinclude>{{#if:{{{parents|}}}|{{#if:{{#arrayprint:parents||@@@@|{{InheritEdgesFrom|@@@@}}}}|
+
--></noinclude>{{#if:{{{parents|}}}|
 
{{{!}} class="xcsgtable"
 
{{{!}} class="xcsgtable"
{{!}}-
 
! colspan="5" {{!}} Inherited Out Edges
 
 
{{!}}-
 
{{!}}-
 
! Inherited From !! Out Edge  !! Successor (Points To) !! Multiplicity !! Description
 
! Inherited From !! Out Edge  !! Successor (Points To) !! Multiplicity !! Description
 
{{#arrayprint:parents||@@@@|&#32;
 
{{#arrayprint:parents||@@@@|&#32;
 
{{InheritEdgesFrom|@@@@}}}}
 
{{InheritEdgesFrom|@@@@}}}}
{{!}}} }} }}
+
{{!}}} }}

Revision as of 19:03, 21 April 2014

For use on node kind pages, automatically lists edges declared on the current page.

If the parameter "parents" is given a comma-separated list of the parents of the node, inherited edges will also be listed.