1 #ifndef _STORE_H_
2 #define _STORE_H_
4 #include <oberon.h>
5 #include <domain.h>
6 #include <typeregister.h>
7 #include <visitor.h>
9 #include <string>
10 #include <vector>
18 };
20 /**
21 * TYPE Store
22 * ABSTRACT
23 * Storable extensible data types like Views.View or TextModels.Text are derived from Store.
24 * Stores are typically allocated by suitable directories, e.g., Views.Directory or TextModels.Directory.
25 * Stores are used as base types for all objects that must be both extensible and persistent.
26 */
31 INTEGER d_id;
36 static const SHORTCHAR NEWEXT = 0xF1; // (* new extension type (level = 1), i.e. not yet in dict *)
48 /**
49 * Get the TypeName for this object.
50 */
52 /**
53 * Get the TypePath to this object's type.
54 * I'm not sure why this was necessary, I think BlackBox uses them in some code
55 * I've omitted.
56 * @see TypePath
57 */
60 /**
61 * PROCEDURE (s: Store) Domain (): Domain
62 * NEW
63 * A store may be associated with a domain. This is done by the procedure InitDomain, which assigns a domain to the store.
64 * Domain may be called by arbitrary clients.
65 */
66 //Domain* getDomain();
68 /**
69 * Read the contents of "this" from reader.
70 * Just reads the version and checks that its in the allowed range.
71 */
74 // In BlackBox, a Store will also have an externalize(writer) method.
75 // The internalize and externalize should be compatible (internalize
76 // should be able to read what externalize writes).
78 /**
79 * A debug "toString".
80 */
83 /**
84 * Receiving end of the Visitor pattern.
85 */
90 };
92 /**
93 * An "Elem" store. Some kind of legacy BlackBox type that has been rolled into Store.
94 * I actually found it easier to keep the two separate.
95 */
105 /**
106 * Just calls super and reads the version and checks that its in the allowed range.
107 */
109 };
111 /**
112 * A "Model" store. The basis for all model objects (in MVC framework).
113 * Most objects of interest extend Model.
114 */
124 /**
125 * Just calls super and reads the version and checks that its in the allowed range.
126 */
128 };
130 /**
131 * Super type for models that contain other stuff (e.g. TextModel).
132 */
142 /**
143 * Just calls super and reads the version and checks that its in the allowed range.
144 */
146 };
147 }