gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz gzz/Cell.java gzz/CellTexter.java gzz/Dim.j...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz gzz/Cell.java gzz/CellTexter.java gzz/Dim.j...
Date: Thu, 29 Aug 2002 06:08:36 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/08/29 06:08:35

Modified files:
        gzz            : Cell.java CellTexter.java Dim.java 
        gzz/impl       : AbstractSpace.java ModularDeltaSpace.java 
                         ModularSpace.java SimpleVStreamTexter.java 
        gzz/view       : VobVanishingClient.java 
        gzz/zzutil     : RankList.java 
        test/gzz       : TestReadWriteDim.java 
        test/gzz/impl  : TestSimpleDim.java saving.test 

Log message:
        Implement PEG 1002. Space saving and loading test now gets a bizarre 
error that I don't know how to fix.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/Cell.java.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/CellTexter.java.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/Dim.java.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/impl/AbstractSpace.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/impl/ModularDeltaSpace.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/impl/ModularSpace.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/impl/SimpleVStreamTexter.java.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/VobVanishingClient.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/zzutil/RankList.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/TestReadWriteDim.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/impl/TestSimpleDim.java.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/impl/saving.test.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: gzz/gzz/Cell.java
diff -c gzz/gzz/Cell.java:1.26 gzz/gzz/Cell.java:1.27
*** gzz/gzz/Cell.java:1.26      Thu Jul  4 13:11:20 2002
--- gzz/gzz/Cell.java   Thu Aug 29 06:08:34 2002
***************
*** 37,43 ****
  import gzz.errors.*;
  import java.util.*;
  import gzz.media.*;
- import gzz.impl.EvilCellTexter;
  
  /** A class to represent a ZigZag cell.
   * <p>
--- 37,42 ----
***************
*** 68,74 ****
   */
  
  public class Cell {
! public static final String rcsid = "$Id: Cell.java,v 1.26 2002/07/04 17:11:20 
tjl Exp $";
  
      public final Space space;
  
--- 67,73 ----
   */
  
  public class Cell {
! public static final String rcsid = "$Id: Cell.java,v 1.27 2002/08/29 10:08:34 
tjl Exp $";
  
      public final Space space;
  
***************
*** 106,117 ****
       * @param dir     The direction, either positive or negative
       * @diagram zzstruct
       */
-     final public Cell N(Cell dim, int dir) {
-       return N(dim, dir, null);
-     }
-     final public Cell N(Cell dim) {
-       return N(dim, 1, null);
-     }
      final public Cell N(Dim dim, int dir) {
        return N(dim, dir, null);
      }
--- 105,110 ----
***************
*** 145,159 ****
      final public Cell getOrNew(Dim dim) {
        return getOrNew(dim, 1, null);
      }
-     final public Cell getOrNew(Cell dim, int dir, Obs o) {
-       return getOrNew(space.getDim(dim), dir, o);
-     }
-     final public Cell getOrNew(Cell dim, int dir) {
-       return getOrNew(dim, dir, null);
-     }
-     final public Cell getOrNew(Cell dim) {
-       return getOrNew(dim, 1, null);
-     }
      /** Create a new cell connected to this cell and attach an observer 
       * to it
       * atomically.
--- 138,143 ----
***************
*** 162,170 ****
       * @param obs     The observer
       * @diagram zzstruct
       */
-     final public Cell N(Cell dim, int dir, Obs o) {
-       return space.N(this, dim, dir, o);
-     }
      final public Cell N(Dim dim, int dir, Obs o) {
        return space.N(this, dim, dir, o);
      }
--- 146,151 ----
***************
*** 176,184 ****
        space.delete(this); 
      }
  
-     final public void excise(Cell dim) {
-       excise(space.getDim(dim));
-     }
      /** Delete this cell from a rank along a dimension. 
       * @diagram zzstruct
       */
--- 157,162 ----
***************
*** 194,203 ****
       * @param to      Cell to connect to. This cell will 
       *                        end up poswards from us.
       */
-     final public void connect(Cell dim, Cell to) 
-       throws ZZAlreadyConnectedException {
-       connect(space.getDim(dim), to);
-     }
      final public void connect(Dim dim, Cell to) 
        throws ZZAlreadyConnectedException {
        dim.connect(this, to);
--- 172,177 ----
***************
*** 213,222 ****
       * @param to      Cell to connect to.
       * @diagram zzstruct
       */
-     final public void connect(Cell dim, int dir, Cell to) 
-           throws ZZAlreadyConnectedException {
-       connect(space.getDim(dim), dir, to);
-     }
      final public void connect(Dim dim, int dir, Cell to)
            throws ZZAlreadyConnectedException {
        if(dir > 0) {
--- 187,192 ----
***************
*** 233,242 ****
       * @param dir     The direction, either positive or negative
       * @param what    Cell to insert
       */
-     final public void insert(Cell dim, int dir, Cell what) 
-       throws ZZAlreadyConnectedException {
-       insert(space.getDim(dim), dir, what);
-     }
      final public void insert(Dim dim, int dir, Cell what)
          throws ZZAlreadyConnectedException {
        dim.insert(this, dir, what);
--- 203,208 ----
***************
*** 247,267 ****
       * @param dir     The direction, either positive or negative
       * @diagram zzstruct
       */
-     final public void disconnect(Cell dim, int dir) {
-       disconnect(space.getDim(dim), dir);
-     }
      final public void disconnect(Dim dim, int dir) {
        dim.disconnect(this, dir);
      }
  
-     /** Set the content of this cell as a Span.
-      * @param text    The new text, as a span pointing to a stable scroll
-      * @deprecated To be replaced by VStream methods.
-      */
-     final public void setSpan(Span text) {
-       ((EvilCellTexter)space.getCellTexter()).setSpan(this, text);
-     }
- 
      /** Set the content of this cell as text.
       * XXX Need to think about potential other types: int etc.
       * @param text    The new text
--- 213,222 ----
***************
*** 311,319 ****
      final public Cell s(Dim dim, int steps, Obs o) {
        return dim.s(this, steps, o);
      }
-     final public Cell s(Cell dim, int steps, Obs o) {
-       return space.getDim(dim).s(this, steps, o);
-     }
  
      /** Find the neighbour of this cell along a dimension
       * atomically.
--- 266,271 ----
***************
*** 321,342 ****
       * @param dir     The direction, either positive or negative
       * @return        The neighbour, or null if none.
       */
-     final public Cell s(Cell dim, int dir) {
-       return s(dim,dir,null);
-     }
      final public Cell s(Dim dim, int dir) {
        return s(dim,dir,null);
      }
  
-     final public Cell s(Cell dim) {
-       return s(dim,1,null);
-     }
      final public Cell s(Dim dim) {
        return s(dim,1,null);
      }
-     final public Cell s(Cell dim, Obs o) {
-       return s(dim,1,o);
-     }
      /** Find the next cell along a dimension.
       * Always moves poswards.
       * @param dim     Dimension to go along
--- 273,285 ----
***************
*** 346,376 ****
        return s(dim,1,o);
      }
  
-     final public Cell h(Cell dim, int dir) {
-       return h(dim, dir, false, null);
-     }
-     final public Cell h(Cell dim, int dir, Obs o) {
-       return h(dim, dir, false, o);
-     }
-     final public Cell h(Cell dim, boolean ensuremove) {
-       return h(dim, -1, ensuremove, null);
-     }
-     final public Cell h(Cell dim, int dir, boolean ensuremove) {
-       return h(dim, dir, ensuremove, null);
-     }
      /** Find the headcell of a rank.
       * The headcell is the most negative cell so this call is equivalent
       * to h(dim, -1).
       */
-     final public Cell h(Cell dim) {
-       return h(dim, -1, false, null);
-     }
      final public Cell h(Dim dim) {
        return h(dim, -1, false, null);
      }
      final public Cell h(Dim dim, int dir) {
        return h(dim, dir, false, null);
      }
  
      /** Find the headcell of a rank.
       * Always returns a cell, even if rank is looping.
--- 289,307 ----
        return s(dim,1,o);
      }
  
      /** Find the headcell of a rank.
       * The headcell is the most negative cell so this call is equivalent
       * to h(dim, -1).
       */
      final public Cell h(Dim dim) {
        return h(dim, -1, false, null);
      }
      final public Cell h(Dim dim, int dir) {
        return h(dim, dir, false, null);
      }
+     final public Cell h(Dim dim, int dir, boolean ensuremove) {
+       return h(dim, dir, ensuremove, null);
+     }
  
      /** Find the headcell of a rank.
       * Always returns a cell, even if rank is looping.
***************
*** 386,395 ****
       * @return        The headcell
       * @diagram zzstruct
       */
-     final public Cell h(Cell dim, int dir, boolean ensuremove,
-           Obs o) {
-       return h(space.getDim(dim), dir, ensuremove, o);
-     }
  
      final public Cell h(Dim dim, int dir, boolean ensuremove,
            Obs o) {
--- 317,322 ----
***************
*** 413,429 ****
        return text;
      }
  
-     /** Returns the stable media reference in the cell.
-      * A null return means either that the cell has been deleted
-      * or that the text inside is not a reference.
-      * @param lang    The requested language.
-      */
-     final public Span getSpan() { return getSpan(null); }
-     final public Span getSpan(Obs o) { 
-       // return ((EvilCellTexter)space.getCellTexter()).getSpan(this, o); 
-       return null;
-     }
- 
      /** Tests whether this cell is the same as another cell.
       * There may be more than one Java object representing the same cell
       * so it is important to use this method instead of the '==' operator
--- 340,345 ----
***************
*** 454,462 ****
       *                        in which case the cell will hop negwards.
       * @diagram zzstruct
       */
-     final public void hop(Cell dim, int steps) {
-       hop(space.getDim(dim), steps);
-     }
      final public void hop(Dim dim, int steps) {
        dim.hop(this, steps);
      }
--- 370,375 ----
Index: gzz/gzz/CellTexter.java
diff -c gzz/gzz/CellTexter.java:1.11 gzz/gzz/CellTexter.java:1.12
*** gzz/gzz/CellTexter.java:1.11        Sun Aug 25 03:39:13 2002
--- gzz/gzz/CellTexter.java     Thu Aug 29 06:08:34 2002
***************
*** 41,48 ****
  
  public interface CellTexter {
  
-     void setSpace(Space s);
- 
      /** Set the text for the given cell.
       * @diagram zzstruct
       */
--- 41,46 ----
Index: gzz/gzz/Dim.java
diff -c gzz/gzz/Dim.java:1.14 gzz/gzz/Dim.java:1.15
*** gzz/gzz/Dim.java:1.14       Sun Aug 25 04:15:07 2002
--- gzz/gzz/Dim.java    Thu Aug 29 06:08:34 2002
***************
*** 38,44 ****
   */
  
  public interface Dim {
! String rcsid = "$Id: Dim.java,v 1.14 2002/08/25 08:15:07 tjl Exp $";
  
      /** Get the space this dimension is affilated with. */
      Space getSpace();
--- 38,44 ----
   */
  
  public interface Dim {
! String rcsid = "$Id: Dim.java,v 1.15 2002/08/29 10:08:34 tjl Exp $";
  
      /** Get the space this dimension is affilated with. */
      Space getSpace();
***************
*** 167,183 ****
       * @diagram zzstruct
       */
      Iterator iterator(Cell c);
- 
-     /** Canonicalize the cells of this dimension.
-      * XXX This is a part of the ugly hack to make
-      * Cell.inclusionObject work with CompoundSpace.
-      * Because we may make several connections when including
-      * a space with the non-canonical Cell objects which are
-      * slower to handle, this function may be called afterwards
-      * to request the Cell objects that this Dim contains
-      * to be canonicalized using Space.getCell(cell.id).
-      * <p>
-      * @deprecated Compoundspace etc are deprecated, too...
-      */
-     void canonicalizeCells();
  }
--- 167,170 ----
Index: gzz/gzz/impl/AbstractSpace.java
diff -c gzz/gzz/impl/AbstractSpace.java:1.8 gzz/gzz/impl/AbstractSpace.java:1.9
*** gzz/gzz/impl/AbstractSpace.java:1.8 Sat Aug  3 14:22:30 2002
--- gzz/gzz/impl/AbstractSpace.java     Thu Aug 29 06:08:34 2002
***************
*** 33,62 ****
   */
  
  public abstract class AbstractSpace implements SliceSpace {
! public static final String rcsid = "$Id: AbstractSpace.java,v 1.8 2002/08/03 
18:22:30 benja Exp $";
  
!     protected CellTexter cellTexter;
      protected JavaObjector javaObjector;
      protected ObsTrigger obsTrigger;
      protected Slicer slicer;
  
!     public AbstractSpace(CellTexter cellTexter, Slicer slicer,
                           ObsTrigger obsTrigger) {
        this.cellTexter = cellTexter;
          this.slicer = slicer;
          this.obsTrigger = obsTrigger;
  
-       if(cellTexter != null)
-           cellTexter.setSpace(this);
          if(slicer != null)
              slicer.setSpace(this);
-     }
- 
-     /** Should only be called in the constructor.
-      */
-     protected void setCellTexter(CellTexter texter) {
-       this.cellTexter = texter;
-       cellTexter.setSpace(this);
      }
  
      public CellTexter getCellTexter() { return cellTexter; }
--- 33,53 ----
   */
  
  public abstract class AbstractSpace implements SliceSpace {
! public static final String rcsid = "$Id: AbstractSpace.java,v 1.9 2002/08/29 
10:08:34 tjl Exp $";
  
!     protected ModularCellTexter cellTexter;
      protected JavaObjector javaObjector;
      protected ObsTrigger obsTrigger;
      protected Slicer slicer;
  
!     public AbstractSpace(ModularCellTexter cellTexter, Slicer slicer,
                           ObsTrigger obsTrigger) {
        this.cellTexter = cellTexter;
          this.slicer = slicer;
          this.obsTrigger = obsTrigger;
  
          if(slicer != null)
              slicer.setSpace(this);
      }
  
      public CellTexter getCellTexter() { return cellTexter; }
Index: gzz/gzz/impl/ModularDeltaSpace.java
diff -c gzz/gzz/impl/ModularDeltaSpace.java:1.4 
gzz/gzz/impl/ModularDeltaSpace.java:1.5
*** gzz/gzz/impl/ModularDeltaSpace.java:1.4     Sat Aug  3 14:22:30 2002
--- gzz/gzz/impl/ModularDeltaSpace.java Thu Aug 29 06:08:34 2002
***************
*** 31,38 ****
  /** ModularSpace extended to implement gzz.diff.DeltaSpace
   */
  public class ModularDeltaSpace extends ModularSpace implements DeltaSpace{
! public static final String rcsid = "$Id: ModularDeltaSpace.java,v 1.4 
2002/08/03 18:22:30 benja Exp $";
!     public ModularDeltaSpace(CellTexter cellTexter,
                CellManager cellManager, DimManager dimManager,
                IdentityManager identityManager,
                  Slicer slicer,
--- 31,38 ----
  /** ModularSpace extended to implement gzz.diff.DeltaSpace
   */
  public class ModularDeltaSpace extends ModularSpace implements DeltaSpace{
! public static final String rcsid = "$Id: ModularDeltaSpace.java,v 1.5 
2002/08/29 10:08:34 tjl Exp $";
!     public ModularDeltaSpace(ModularCellTexter cellTexter,
                CellManager cellManager, DimManager dimManager,
                IdentityManager identityManager,
                  Slicer slicer,
Index: gzz/gzz/impl/ModularSpace.java
diff -c gzz/gzz/impl/ModularSpace.java:1.6 gzz/gzz/impl/ModularSpace.java:1.7
*** gzz/gzz/impl/ModularSpace.java:1.6  Sat Aug  3 14:22:30 2002
--- gzz/gzz/impl/ModularSpace.java      Thu Aug 29 06:08:34 2002
***************
*** 32,44 ****
   * a DimManager.
   */
  public class ModularSpace extends AbstractSpace {
! public static final String rcsid = "$Id: ModularSpace.java,v 1.6 2002/08/03 
18:22:30 benja Exp $";
  
      protected CellManager cellManager;
      protected DimManager dimManager;
      protected IdentityManager identityManager;
  
!     public ModularSpace(CellTexter cellTexter,
                CellManager cellManager, DimManager dimManager,
                IdentityManager identityManager,
                  Slicer slicer,
--- 32,44 ----
   * a DimManager.
   */
  public class ModularSpace extends AbstractSpace {
! public static final String rcsid = "$Id: ModularSpace.java,v 1.7 2002/08/29 
10:08:34 tjl Exp $";
  
      protected CellManager cellManager;
      protected DimManager dimManager;
      protected IdentityManager identityManager;
  
!     public ModularSpace(ModularCellTexter cellTexter,
                CellManager cellManager, DimManager dimManager,
                IdentityManager identityManager,
                  Slicer slicer,
***************
*** 50,55 ****
--- 50,57 ----
        cellManager.setSpace(this);
        dimManager.setSpace(this);
        identityManager.setSpace(this);
+       if(cellTexter != null)
+           cellTexter.setSpace(this);
      }
  
      /** Create a new ModularSpace and initialize it from a SliceVersion.
***************
*** 63,69 ****
       *  swapIn(getSlice0())...
       */
      public ModularSpace(SliceVersion version,
!                 CellTexter cellTexter,
                CellManager cellManager, DimManager dimManager,
                IdentityManager identityManager,
                  Slicer slicer,
--- 65,71 ----
       *  swapIn(getSlice0())...
       */
      public ModularSpace(SliceVersion version,
!                 ModularCellTexter cellTexter,
                CellManager cellManager, DimManager dimManager,
                IdentityManager identityManager,
                  Slicer slicer,
Index: gzz/gzz/impl/SimpleVStreamTexter.java
diff -c gzz/gzz/impl/SimpleVStreamTexter.java:1.14 
gzz/gzz/impl/SimpleVStreamTexter.java:1.15
*** gzz/gzz/impl/SimpleVStreamTexter.java:1.14  Tue Aug 20 06:15:38 2002
--- gzz/gzz/impl/SimpleVStreamTexter.java       Thu Aug 29 06:08:34 2002
***************
*** 32,41 ****
  /** A simple referential CellTexter.
   */
  public class SimpleVStreamTexter implements VStreamCellTexter,
!                                             SearchableCellTexter {
  
      protected Map contents = new HashMap();
!     Space space;
      SpanMaker spanMaker;
      Enfilade1D.Maker enfMaker;
  
--- 32,42 ----
  /** A simple referential CellTexter.
   */
  public class SimpleVStreamTexter implements VStreamCellTexter,
!                                             SearchableCellTexter,
!                                           ModularCellTexter {
  
      protected Map contents = new HashMap();
!     ModularSpace space;
      SpanMaker spanMaker;
      Enfilade1D.Maker enfMaker;
  
***************
*** 69,75 ****
        this.enfMaker = enfMaker;
      }
  
!     public void setSpace(Space space) {
        this.space = space;
      }
  
--- 70,76 ----
        this.enfMaker = enfMaker;
      }
  
!     public void setSpace(ModularSpace space) {
        this.space = space;
      }
  
Index: gzz/gzz/view/VobVanishingClient.java
diff -c gzz/gzz/view/VobVanishingClient.java:1.4 
gzz/gzz/view/VobVanishingClient.java:1.5
*** gzz/gzz/view/VobVanishingClient.java:1.4    Sun Aug 25 17:20:26 2002
--- gzz/gzz/view/VobVanishingClient.java        Thu Aug 29 06:08:34 2002
***************
*** 158,253 ****
      */
  
      public Object getVobSize(Cell c, float fract, int flags, Dimension 
outDim) {
! 
!       if((flags & VanishingClient.CENTER) != 0) {
!           p("Center: "+c+" span: "+c.getSpan());
!       }
! 
!       Span span = c.getSpan();
!       Vob v;
!       if (span != null && span instanceof ImageSpan) {
!           int iw = (int)(60 * fract);
!           int ih = (int)(20 * fract);
! 
!           // Paint the span, if it's e.g. an imagespan.
!           Image img = null;
!           if (span instanceof PageSpan) {
!               // Take 1st page if not under cursor, otherwise page'th page
!               p("Is pagespan");
!               PageSpan pagespan = (PageSpan)span;
!               if((flags & VanishingClient.CENTER) != 0) {
!                   p("Center: take page'th page");
!                   // clip page index to span length
!                   if(page >= pagespan.length()) {
!                       p("Clipping page to "+pagespan);
!                       page = pagespan.length() - 1;
!                   }
!                   img = ((PageSpan)(pagespan.subSpan(page, page+1))).
!                               getImage();
!               } else {
!                   img = ((PageSpan)(pagespan.subSpan(0, 1))).getImage();
!               }
!           }
!           else if (span instanceof ImageSpan) {
!               p("Is imagespan");
!               img = ((ImageSpan)span).getImage();
!           }
! 
!           p("Image for cellimagevob: "+img);
! 
!           // If available, use the dimensions of the actual image
!           // returned. There are some bugs with assuming the letter paper size
!           // for now.
!           Dimension dii = ((ImageSpan)span).getSize();
!           v = new CellImageVob(c, img);
! 
!           if (img != null) {
!               iw = img.getWidth(null);
!               ih = img.getHeight(null);
!           }
!           if(iw == -1) iw = (int)dii.width;
!           if(ih == -1) ih = (int)dii.height;
! 
! 
!           if (iw > 0 && ih > 0) {
!               double img_ratio = ((double)iw) / ih;
!               boolean zoomnow = usezoom &&
!                   ((flags & VanishingClient.CENTER) != 0);
!               if(zoomnow && zoom == 2) {
!                   // no change: just use iw and ih -- pixel-to-pixel.
!               } else {
!                   if(!zoomnow || zoom == 0)
!                       iw = (int)(60 * fract);
!                   else /* zoom == 1 */
!                       iw = (int)((iw + 60 * fract) / 2);
!                   ih = (int)(iw / img_ratio);
!               }
!               /*
!                 if (img_ratio < 1) {
!                 ih = h;
!                 iw = (int)(img_ratio * h);
!                 }
!                 else {
!               */
!               // iw =  (int)(60 * fract); // XXX
!               // ih = (int)(((double)iw) / img_ratio);
!               /* } */
!           }
!           else {
!               iw = (int)(60 * fract);
!               ih = (int)(20 * fract);
!           }
! 
!           outDim.width= iw;
!           outDim.height= ih;
!           if(dbg) p("Final vobsize: "+iw+" "+ih);
!           return v;
!       }
! 
!       else {
!           cvf.getDefaultSize(fract, outDim);
!           return null;
!       }
      }
  
      public void place(Cell c, Object o, float fract, int x0, int y0, int x1, 
int y1,
--- 158,165 ----
      */
  
      public Object getVobSize(Cell c, float fract, int flags, Dimension 
outDim) {
!       cvf.getDefaultSize(fract, outDim);
!       return null;
      }
  
      public void place(Cell c, Object o, float fract, int x0, int y0, int x1, 
int y1,
Index: gzz/gzz/zzutil/RankList.java
diff -c gzz/gzz/zzutil/RankList.java:1.2 gzz/gzz/zzutil/RankList.java:1.3
*** gzz/gzz/zzutil/RankList.java:1.2    Wed Jun 26 06:11:42 2002
--- gzz/gzz/zzutil/RankList.java        Thu Aug 29 06:08:35 2002
***************
*** 37,43 ****
   */
  
  public class RankList extends AbstractSequentialList {
! public static final String rcsid = "$Id: RankList.java,v 1.2 2002/06/26 
10:11:42 tjl Exp $";
      static boolean dbg = false;
      static void p(String s) { if(dbg) System.out.println(s); }
  
--- 37,43 ----
   */
  
  public class RankList extends AbstractSequentialList {
! public static final String rcsid = "$Id: RankList.java,v 1.3 2002/08/29 
10:08:35 tjl Exp $";
      static boolean dbg = false;
      static void p(String s) { if(dbg) System.out.println(s); }
  
***************
*** 51,62 ****
        this.dim = dim;
        head = onRank.h(dim);
      }
- 
-     public RankList(Cell onRank, Cell dim) {
-       this.dim = onRank.space.getDim(dim);
-       head = onRank.h(dim);
-     }
- 
      public ListIterator listIterator(int index) {
        if(index == 0)
            return new CellIterator(null);
--- 51,56 ----
Index: gzz/test/gzz/TestReadWriteDim.java
diff -c gzz/test/gzz/TestReadWriteDim.java:1.9 
gzz/test/gzz/TestReadWriteDim.java:1.10
*** gzz/test/gzz/TestReadWriteDim.java:1.9      Sat May 25 07:34:51 2002
--- gzz/test/gzz/TestReadWriteDim.java  Thu Aug 29 06:08:35 2002
***************
*** 35,41 ****
   */
  
  public abstract class TestReadWriteDim extends TestCase {
! public static final String rcsid = "$Id: TestReadWriteDim.java,v 1.9 
2002/05/25 11:34:51 tjl Exp $";
  
      public TestReadWriteDim(String name) { super(name); }
  
--- 35,41 ----
   */
  
  public abstract class TestReadWriteDim extends TestCase {
! public static final String rcsid = "$Id: TestReadWriteDim.java,v 1.10 
2002/08/29 10:08:35 tjl Exp $";
  
      public TestReadWriteDim(String name) { super(name); }
  
***************
*** 207,219 ****
        assertTrue(d.h(c[0], 1) == c[4]);
        assertTrue(d.h(c[4], 1) == c[4]);
  
!       assertTrue(c[2].h(dcell, -1) == c[0]);
!       assertTrue(c[2].h(dcell, 1) == c[4]);
!       assertTrue(c[2].h(dcell, -1, true) == c[0]);
!       assertTrue(c[0].h(dcell, -1, true) == null);
!       assertTrue(c[0].h(dcell, -1, false) == c[0]);
!       assertTrue(c[0].h(dcell, 1, true) == c[4]);
!       assertTrue(c[4].h(dcell, 1, true) == null);
      }
  
      public void testLoop() throws ZZException {
--- 207,219 ----
        assertTrue(d.h(c[0], 1) == c[4]);
        assertTrue(d.h(c[4], 1) == c[4]);
  
!       assertTrue(c[2].h(d, -1) == c[0]);
!       assertTrue(c[2].h(d, 1) == c[4]);
!       assertTrue(c[2].h(d, -1, true) == c[0]);
!       assertTrue(c[0].h(d, -1, true) == null);
!       assertTrue(c[0].h(d, -1, false) == c[0]);
!       assertTrue(c[0].h(d, 1, true) == c[4]);
!       assertTrue(c[4].h(d, 1, true) == null);
      }
  
      public void testLoop() throws ZZException {
Index: gzz/test/gzz/impl/TestSimpleDim.java
diff -c gzz/test/gzz/impl/TestSimpleDim.java:1.12 
gzz/test/gzz/impl/TestSimpleDim.java:1.13
*** gzz/test/gzz/impl/TestSimpleDim.java:1.12   Sun Aug 18 05:52:02 2002
--- gzz/test/gzz/impl/TestSimpleDim.java        Thu Aug 29 06:08:35 2002
***************
*** 33,45 ****
   */
  
  public class TestSimpleDim extends TestReadWriteDim {
! public static final String rcsid = "$Id: TestSimpleDim.java,v 1.12 2002/08/18 
09:52:02 benja Exp $";
  
      public TestSimpleDim(String name) { super(name); }
  
      ObsTrigger obsTrigger = new SimpleObsTrigger();
  
!     CellTexter cellTexter = new SimpleVStreamTexter(new FakeSpanMaker(),
                new Enfilade1DImpl.Enfilade1DImplMaker(), null);
      CellManager cellManager = new PlainCellManager();
      DimManager dimManager = new SimpleDim.SimpleDimManager();
--- 33,45 ----
   */
  
  public class TestSimpleDim extends TestReadWriteDim {
! public static final String rcsid = "$Id: TestSimpleDim.java,v 1.13 2002/08/29 
10:08:35 tjl Exp $";
  
      public TestSimpleDim(String name) { super(name); }
  
      ObsTrigger obsTrigger = new SimpleObsTrigger();
  
!     ModularCellTexter cellTexter = new SimpleVStreamTexter(new 
FakeSpanMaker(),
                new Enfilade1DImpl.Enfilade1DImplMaker(), null);
      CellManager cellManager = new PlainCellManager();
      DimManager dimManager = new SimpleDim.SimpleDimManager();
Index: gzz/test/gzz/impl/saving.test
diff -c gzz/test/gzz/impl/saving.test:1.4 gzz/test/gzz/impl/saving.test:1.5
*** gzz/test/gzz/impl/saving.test:1.4   Sun Aug 18 08:00:30 2002
--- gzz/test/gzz/impl/saving.test       Thu Aug 29 06:08:35 2002
***************
*** 48,54 ****
  def testSaveLoad():
      """Test space saving and re-loading"""
      a,b,c = space.N(), space.N(), space.N()
!     a.connect(b, c)
      a.setText("foo")
  
      ids = serv.getIDs()
--- 48,54 ----
  def testSaveLoad():
      """Test space saving and re-loading"""
      a,b,c = space.N(), space.N(), space.N()
!     a.connect(space.getDim(b), c)
      a.setText("foo")
  
      ids = serv.getIDs()
***************
*** 66,77 ****
      assert ids == serv.getIDs()
  
      a2, b2, c2 = [s2.getCell(cell.getId()) for cell in (a,b,c)]
!     assert a2.s(b2) == c2
      assert a2.t() == "foo"
  
      a2.insertText(2, "bing")
      c2.setText("bar")
!     a2.insert(b2, 1, b2)
  
      ids = serv.getIDs()
      save(s2)
--- 66,77 ----
      assert ids == serv.getIDs()
  
      a2, b2, c2 = [s2.getCell(cell.getId()) for cell in (a,b,c)]
!     assert a2.s(space.getDim(b2)) == c2
      assert a2.t() == "foo"
  
      a2.insertText(2, "bing")
      c2.setText("bar")
!     a2.insert(space.getDim(b2), 1, b2)
  
      ids = serv.getIDs()
      save(s2)
***************
*** 79,86 ****
      s3 = load()
  
      a3, b3, c3 = [s3.getCell(cell.getId()) for cell in (a,b,c)]
!     assert a3.s(b3) == b3
!     assert b3.s(b3) == c3
      assert a3.t() == "fobingo"
      assert c3.t() == "bar"
  
--- 79,86 ----
      s3 = load()
  
      a3, b3, c3 = [s3.getCell(cell.getId()) for cell in (a,b,c)]
!     assert a3.s(space.getDim(b3)) == b3
!     assert b3.s(space.getDim(b3)) == c3
      assert a3.t() == "fobingo"
      assert c3.t() == "bar"
  
***************
*** 103,106 ****
      v = space.getSlicer().export(space.getSlicer().getSlice0())
      enf = v.contents.get(c.getId())
      assert enf.makeString() == "foobar"
!     assert enf.getList().size() == 1
\ No newline at end of file
--- 103,106 ----
      v = space.getSlicer().export(space.getSlicer().getSlice0())
      enf = v.contents.get(c.getId())
      assert enf.makeString() == "foobar"
!     assert enf.getList().size() == 1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]