Module Simula

Class RTS_Linkage

All Implemented Interfaces:
Runnable
Direct Known Subclasses:
RTS_Head, RTS_Link

public class RTS_Linkage extends RTS_CLASS
System class Linkage.
          class linkage;
          begin ref (linkage) SUC, PRED;
             ref (link) procedure suc;
                        suc:- if SUC in link then SUC else none;
             ref (link) procedure pred;
                       pred:- if PRED in link then PRED else none;
             ref (linkage) procedure prev;   prev:- PRED;
 
          end linkage;
 
The class "linkage" is the common denominator for set heads and set members.

SUC is a reference to the successor of this linkage object in the set, PRED is a reference to the predecessor.

The value of SUC and PRED may be obtained through the procedures "suc" and "pred". These procedures give the value none if the designated object is not a set member, i.e. of class "link" or a subclass of "link".

The attributes SUC and PRED may only be modified through the use of procedures defined within "link" and "head". This protects the user against certain kinds of programming errors.

The procedure "prev" enables a user to access a set head from its first member.

Link to GitHub: Source File.

Author:
SIMULA Standards Group, Øystein Myhre Andersen
  • Field Details

  • Constructor Details

    • RTS_Linkage

      public RTS_Linkage(RTS_RTObject SL)
      Create a new _Linkage.
      Parameters:
      SL - staticLink
  • Method Details

    • _STM

      public RTS_Linkage _STM()
      Description copied from class: RTS_RTObject
      Method representing the Statements in this Block
      This method is virtual and must be redefined in blocks.
      Overrides:
      _STM in class RTS_RTObject
      Returns:
      a pointer to this _RTObject
    • suc

      public RTS_Link suc()
      Returns the successor link.
      Returns:
      the successor link
    • pred

      public RTS_Link pred()
      Returns the predecessor link.
      Returns:
      the predecessor link
    • prev

      public RTS_Linkage prev()
      Return the previous linkage.
      Returns:
      the previous linkage