1 #ifndef _STORE_H_
2 #define _STORE_H_
4 #include <oberon.h>
5 #include <typeregister.h>
6 #include <visitor.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 */
30 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 for this object.
49 */
51 /**
52 * Get the TypePath to this object's type.
53 * I'm not sure why this was necessary, I think BlackBox uses them in some code
54 * I've omitted.
55 * @see TypePath
56 */
59 /**
60 * PROCEDURE (s: Store) Domain (): Domain
61 * NEW
62 * A store may be associated with a domain. This is done by the procedure InitDomain, which assigns a domain to the store.
63 * Domain may be called by arbitrary clients.
64 */
65 //Domain* getDomain();
67 /**
68 * Read the contents of "this" from reader.
69 * Just reads the version and checks that its in the allowed range.
70 */
73 // In BlackBox, a Store will also have an externalize(writer) method.
74 // The internalize and externalize should be compatible (internalize
75 // should be able to read what externalize writes).
77 /**
78 * A debug "toString".
79 */
82 /**
83 * Receiving end of the Visitor pattern.
84 */
89 };
91 /**
92 * An "Elem" store. Some kind of legacy BlackBox type that has been rolled into Store.
93 * I actually found it easier to keep the two separate.
94 */
104 /**
105 * Just calls super and reads the version and checks that its in the allowed range.
106 */
108 };
110 /**
111 * A "Model" store. The basis for all model objects (in MVC framework).
112 * Most objects of interest extend Model.
113 */
123 /**
124 * Just calls super and reads the version and checks that its in the allowed range.
125 */
127 };
129 /**
130 * Super type for models that contain other stuff (e.g. TextModel).
131 */
141 /**
142 * Just calls super and reads the version and checks that its in the allowed range.
143 */
145 };
146 }