Guest User

Untitled

a guest
Jun 29th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.53 KB | None | 0 0
  1. generic
  2.    type Node_Level is (<>);
  3. package Tree is
  4.  
  5.    -- it's a binary tree. for now.
  6.    type Tree_Direction is (Left, Right);
  7.  
  8.    type Direction_Array is array (Node_Level range <>) of Tree_Direction;
  9.  
  10.    type Path_To_Node (Depth : Node_Level) is record
  11.       case Depth is
  12.          when Node_Level'First => Directions : Root_Node;
  13.          others => Directions : Direction_Array (Node_Level'First .. Depth'Pred);
  14.       end case;
  15.    end record;
  16.    
  17.    -- .. somewhere here, the actual Tree structure is defined
  18. end Tree;
Add Comment
Please, Sign In to add comment