/[gzz]/gzz/lava/gzz/zzutil/Containment.java
ViewVC logotype

Diff of /gzz/lava/gzz/zzutil/Containment.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by benja, Thu Nov 7 22:52:42 2002 UTC revision 1.4 by benja, Mon Nov 25 23:52:50 2002 UTC
# Line 33  public class Containment { Line 33  public class Containment {
33       *  structure and joins the text of the different cells       *  structure and joins the text of the different cells
34       *  together.       *  together.
35       */       */
36      public String getContainedText(Cell c) {      public static String getContainedText(Cell c) {
37          return null;          Dim d_contain = c.space.getDim(Ids.d_contain);
38            Dim d_contain_list = c.space.getDim(Ids.d_contain_list);
39    
40            String s = c.t();
41            Cell head = c.s(d_contain);
42            if(head == null) return s;
43    
44            Cell x = head;
45            do {
46                s += getContainedText(x);
47                x = x.s(d_contain_list);
48            } while(x != null && !x.equals(head));
49    
50            return s;
51      }      }
52    
53      /** Get the contents of this cell as an Enfilade1D,      /** Get the contents of this cell as an Enfilade1D,
54       *  as specified by the containment mechanism.       *  as specified by the containment mechanism.
55       */       */
56      public Enfilade1D getContainedEnfilade(Cell c) {      public static Enfilade1D getContainedEnfilade(Cell c) {
57          return null;          VStreamCellTexter t = (VStreamCellTexter)c.space.getCellTexter();
58            Dim d_contain = c.space.getDim(Ids.d_contain);
59            Dim d_contain_list = c.space.getDim(Ids.d_contain_list);
60    
61            Enfilade1D enf = t.getEnfilade(c, null);
62    
63            Cell head = c.s(d_contain);
64            if(head == null) return enf;
65    
66            Cell x = head;
67            do {
68                enf = enf.plus(getContainedEnfilade(x));
69                x = x.s(d_contain_list);
70            } while(x != null && !x.equals(head));
71    
72            return enf;
73      }      }
74    
75      /** Add the 'add' cell to the end of the list of cells      /** Add the 'add' cell to the end of the list of cells
# Line 54  public class Containment { Line 82  public class Containment {
82       *        (i.e., has a connection on d..contain-list, or       *        (i.e., has a connection on d..contain-list, or
83       *        a connection negwards on d.contain).       *        a connection negwards on d.contain).
84       */       */
85      public void addContainedCell(Cell add, Cell into)      public static void addContainedCell(Cell add, Cell into)
86                                 throws IllegalArgumentException {                                 throws IllegalArgumentException {
87      }      }
88  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26