// ** This class was generated with DemFGen (vers:04/27/2009)


public class InlineFlip{
   private Flip func;
   public InlineFlip(Flip f){ func = f; }

   public Pict traverse(Pict _h){ return traversePict(_h); }

   public Square traverseSquare(Square _h){
      int _size = func.combine(_h.size);
      return func.combine((Square)_h, (int)_size);
   }
   public Pict traversePict(Pict _h){
      if(_h instanceof Overlay) return this.traverseOverlay((Overlay)_h);
      if(_h instanceof Offset) return this.traverseOffset((Offset)_h);
      if(_h instanceof Circle) return this.traverseCircle((Circle)_h);
      if(_h instanceof Square) return this.traverseSquare((Square)_h);
      else throw new RuntimeException("Unknown Pict Variant");
   }
   public Overlay traverseOverlay(Overlay _h){
      Pict _top = traversePict(_h.top);
      Pict _bot = traversePict(_h.bot);
      return func.combine((Overlay)_h, (Pict)_top, (Pict)_bot);
   }
   public Offset traverseOffset(Offset _h){
      int _dx = func.combine(_h.dx);
      int _dy = func.combine(_h.dy);
      Pict _inner = traversePict(_h.inner);
      return func.combine((Offset)_h, (int)_dx, (int)_dy, (Pict)_inner);
   }
   public Circle traverseCircle(Circle _h){
      int _rad = func.combine(_h.rad);
      return func.combine((Circle)_h, (int)_rad);
   }

}