home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / ad12.zip / RULES.AD < prev    next >
Text File  |  1990-02-23  |  2KB  |  99 lines

  1.  ┌ Node Management Rules
  2.  │   
  3.  │ ┌ Branch to Remote Node
  4.  │ │   Position cursor at local node marker
  5.  │ │   Lookup node in node table
  6.  │ │   
  7.  │ │ ╒ IF not found
  8.  │ │ │   Report error
  9.  │ │  Exit
  10.  │ │ ├ ELSE
  11.  │ │ │   Load chunk containing node
  12.  │ │ │   Load/Display chunk text
  13.  │ │ └ END IF
  14.  │ │ 
  15.  │ │ ┌ Position cursor at selected node
  16.  │ │ │ 
  17.  │ │ │ ╒ IF node id is null
  18.  │ │ │ │   Position at top of chunk
  19.  │ │ │ ├ ELSE
  20.  │ │ │ │   Position at node marker
  21.  │ │ │ └ END IF
  22.  │ │ │ 
  23.  │ │ │ Push node on path stack
  24.  │ │ └  
  25.  │ │ 
  26.  │ │ 
  27.  │ └  
  28.  │   
  29.  │ ┌ Add Node
  30.  │ │   Position cursor at node location
  31.  │ │   Allocate node id from NAT (Node Allocation Table)
  32.  │ │   
  33.  │ │ ╒ IF node not available
  34.  │ │ │   Report error
  35.  │ ──   EXIT
  36.  │ │ ├ ELSE
  37.  │ │ │   Capture node description from operator
  38.  │ │ │   Store node in node table
  39.  │ │ │   Insert local node marker
  40.  │ │ └ END IF
  41.  │ │ 
  42.  │ └  
  43.  │   
  44.  │ ┌ Add Reference to Node
  45.  │ │   Lookup node in node table
  46.  │ │   
  47.  │ │ ╒ IF node not found
  48.  │ │ │   Report error
  49.  │ ──   EXIT
  50.  │ │ ├ ELSE
  51.  │ │ │   Insert source of reference in xref table
  52.  │ │ └ END IF
  53.  │ │ 
  54.  │ └  
  55.  │   
  56.  │ ┌ Delete Node
  57.  │ │ Locate node in node xref table
  58.  │ │   
  59.  │ │ ╒ IF node not found
  60.  │ │ │   Report error
  61.  │ ──   EXIT
  62.  │ │ ├ ELSE
  63.  │ │ │   
  64.  │ │ │ ╔ FOR EACH chunk in which node is referenced
  65.  │ │ │ ║   Remove node marker from chunk
  66.  │ │ │ ╚ END FOR
  67.  │ │ │ 
  68.  │ │ │   Delete node record
  69.  │ │ │ 
  70.  │ │ └ END IF
  71.  │ │ 
  72.  │ └  
  73.  │   
  74.  │ ┌ Data Structures
  75.  │ │ 
  76.  │ │ ┌ Node Record
  77.  │ │ │ ChunkName              External name of the chunk containing node
  78.  │ │ │ NodeName               External name of the node
  79.  │ │ │ NodeId                 Internal ID of the node (from NAT)
  80.  │ │ │ Type                   Node type: branch, procedure, etc.
  81.  │ │ │ Description            External description of node 
  82.  │ │ │ Procedure              Procedure bound to node
  83.  │ │ └  
  84.  │ │   
  85.  │ │ ┌ Chunk Record
  86.  │ │ │ ChunkName              External name of the chunk
  87.  │ │ │ NodeAllocTable (NAT)   Bit map of free/allocated nodes
  88.  │ │ │ Text                   Chunk text
  89.  │ │ └  
  90.  │ │   
  91.  │ │ ┌ Node Xref Record
  92.  │ │ │ Node                   Internal node ID
  93.  │ │ │ ChunkIn                Name of chunk in which node referenced
  94.  │ │ └  
  95.  │ │ 
  96.  │ └  
  97.  │ 
  98.  └ 
  99.