ba0842508d6bf15218d54ce4f6c54a84748c529d
1 #include <store.h>
2 #include <reader.h>
4 #include <iostream>
10 T result;
17 }
18 }
21 }
25 }
35 }
39 }
43 }
47 }
52 }
54 }
63 }
66 }
70 }
74 }
83 }
87 }
91 }
95 }
104 }
108 }
112 }
117 }
126 }
130 }
134 }
139 }
148 }
152 }
156 }
161 }
170 }
174 }
178 }
184 // PROCEDURE (t: StdModel) Internalize (VAR rd: Stores.Reader);
185 // VAR u, un: Run; sp: Piece; lp: LPiece; v: ViewRef;
186 // org, len: INTEGER; ano: BYTE; thisVersion: INTEGER;
187 // attr: Attributes; dict: AttrDict;
188 // BEGIN
189 // ASSERT(t.Domain() = NIL, 20); ASSERT(t.len = 0, 21);
190 // t.Internalize^(rd); IF rd.cancelled THEN RETURN END;
191 // rd.ReadVersion(minVersion, maxStdModelVersion, thisVersion);
192 // IF rd.cancelled THEN RETURN END;
193 // StdInit(t);
194 // dict.len := 0; u := t.trailer;
195 // rd.ReadInt(len); org := rd.Pos() + len;
196 // rd.ReadByte(ano);
197 // WHILE ano # -1 DO
198 // IF ano = dict.len THEN
199 // ReadAttr(rd, attr); Stores.Join(t, attr);
200 // IF dict.len < dictSize THEN dict.attr[dict.len] := attr; INC(dict.len) END
201 // ELSE
202 // attr := dict.attr[ano]
203 // END;
204 // rd.ReadInt(len);
205 // IF len > 0 THEN (* piece *)
206 // NEW(sp); sp.len := len; sp.attr := attr;
207 // sp.file := rd.rider.Base(); sp.org := org; un := sp;
208 // INC(org, len)
209 // ELSIF len < 0 THEN (* longchar piece *)
210 // len := -len; ASSERT(~ODD(len), 100);
211 // NEW(lp); lp.len := len DIV 2; lp.attr := attr;
212 // lp.file := rd.rider.Base(); lp.org := org; un := lp;
213 // INC(org, len)
214 // ELSE (* len = 0 => embedded view *)
215 // NEW(v); v.len := 1; v.attr := attr;
216 // rd.ReadInt(v.w); rd.ReadInt(v.h); Views.ReadView(rd, v.view);
217 // v.view.InitContext(NewContext(v, t));
218 // un := v; INC(org)
219 // END;
220 // INC(t.len, un.len); u.next := un; un.prev := u; u := un;
221 // rd.ReadByte(ano)
222 // END;
223 // rd.SetPos(org);
224 // u.next := t.trailer; t.trailer.prev := u
225 // END Internalize;
226 //
227 }