66e58b0cae59d4dd6d0d093c5cccbcf1d3d74b71
1 #ifndef _STORE_H_
2 #define _STORE_H_
4 #include <oberon.h>
5 #include <domain.h>
6 #include <typeregister.h>
8 #include <string>
9 #include <vector>
17 };
19 /**
20 * TYPE Store
21 * ABSTRACT
22 * Storable extensible data types like Views.View or TextModels.Text are derived from Store.
23 * Stores are typically allocated by suitable directories, e.g., Views.Directory or TextModels.Directory.
24 * Stores are used as base types for all objects that must be both extensible and persistent.
25 */
31 INTEGER d_id;
35 static const SHORTCHAR NEWEXT = 0xF1; // (* new extension type (level = 1), i.e. not yet in dict *)
47 /**
48 * Get the TypeName of this object.
49 * @see TypeRegister
50 */
52 /**
53 * Get the TypeName of the supertype of this object. Return 0 pointer if no supertype.
54 * @see TypeRegister
55 */
57 /**
58 * Get the TypeName for this object.
59 */
61 /**
62 * Get the TypePath to this object's type.
63 * @see TypePath
64 */
67 /**
68 * PROCEDURE (s: Store) Domain (): Domain
69 * NEW
70 * A store may be associated with a domain. This is done by the procedure InitDomain, which assigns a domain to the store.
71 * Domain may be called by arbitrary clients.
72 */
73 //Domain* getDomain();
75 /**
76 * PROCEDURE (s: Store) CopyFrom- (source: Store)
77 * NEW, EMPTY
78 * Copy the contents of source to s. Copying is a deep copy.
79 *
80 * Pre
81 * source # NIL guaranteed
82 * TYP(source) = TYP(s) guaranteed
83 * s.Domain() = NIL guaranteed
84 * s is not yet initialized guaranteed
85 */
86 // FIXME
87 /**
88 * PROCEDURE (s: Store) Internalize- (VAR rd: Reader)
89 * NEW, EMPTY
90 * (For backward compatibility, this method is actually still EXTENSIBLE. This may change in the future.)
91 * Reads the contents of s from reader rd. Internalize must read the same (amount of) data as is written by the corresponding Externalize procedure.
92 * Internalize is called locally.
93 * Internalize is extended by various persistent object types, e.g., models, views, and controllers.
94 *
95 * Pre
96 * source.Domain() = NIL guaranteed
97 * source is not yet initialized guaranteed
98 */
100 // PROCEDURE (s: Store) Internalize- (VAR rd: Reader), NEW, EXTENSIBLE;
101 // VAR thisVersion: INTEGER;
102 // BEGIN
103 // rd.ReadVersion(minVersion, maxStoreVersion, thisVersion);
104 // IF ~rd.cancelled & s.isElem THEN
105 // rd.ReadVersion(minVersion, maxStoreVersion, thisVersion)
106 // (* works since maxStoreVersion = maxElemVersion = 0 in pre-1.3 *)
107 // END
108 // END Internalize;
109 // }
111 /**
112 * PROCEDURE (s: Store) Externalize- (VAR wr: Writer)
113 * NEW, EMPTY
114 * (For backward compatibility, this method is actually still EXTENSIBLE. This may change in the future.)
115 * Write the contents of s to writer wr. Externalize must write the same (amount of) data as is read by the corresponding Internalize procedure.
116 * Externalize ist called locally.
117 * Externalize is extended by various persistent object types, e.g., models, views, and controllers.
118 */
119 // FIXME
121 /**
122 * PROCEDURE (s: Store) ExternalizeAs- (VAR s1: Store)
123 * NEW, EMPTY
124 * Before a store's Externalize procedure is called, its ExternalizeAs procedure is called, which gives the store the opportunity to denote another store that should be externalized in its place (a "proxy"). It is also possible to set s1 to NIL, which means that the store should not be externalized at all. This is used e.g. for compiler error markers, which are never stored.
125 * ExternalizeAs ist called locally.
126 *
127 * Pre
128 * s1 = s guaranteed
129 */
130 // FIXME
137 };
147 /**
148 * Get the TypeName of this object.
149 * @see TypeRegister
150 */
152 /**
153 * Get the TypeName of the supertype of this object. Return 0 pointer if no supertype.
154 * @see TypeRegister
155 */
157 /**
158 * Get the TypeName for this object.
159 */
163 };
173 /**
174 * Get the TypeName of this object.
175 * @see TypeRegister
176 */
178 /**
179 * Get the TypeName of the supertype of this object. Return 0 pointer if no supertype.
180 * @see TypeRegister
181 */
183 /**
184 * Get the TypeName for this object.
185 */
189 };
202 };
203 }