1 #ifndef _CLASSREGISTER_H_
2 #define _CLASSREGISTER_H_
4 #include <oberon.h>
5 #include <map>
6 #include <string>
12 /**
13 * Register of Oberon/BlackBox types.
14 * Each type has a registered name, which refers to the full BlackBox type name (including any modules).
15 * It also (optionally) has a supertype (also referred to by the full BlackBox type name).
16 */
27 /**
28 * Get an instance of the type register (singleton pattern).
29 */
32 /**
33 * Register a new type.
34 */
37 /**
38 * Get a type's proxy.
39 */
41 };
43 /**
44 * Proxy to represent a BlackBox type. Has a name and optional supertype name.
45 * Can instantiate new instances of the type.
46 */
49 /**
50 * Create a new TypeProxy and register it with the TypeRegister.
51 */
53 /**
54 * @return The full BlackBox type name (including modules).
55 */
57 /**
58 * @return The full BlackBox type name of the supertype (if applicable, otherwise a 0-pointer).
59 */
61 /**
62 * @return A new instance of the type, with the given ID.
63 */
65 };
67 /**
68 * Proxy for a toplevel type (no supertype).
69 * T: the class to proxy for.
70 * Requires T to have a static const std::string TYPENAME.
71 */
77 }
80 }
83 }
84 };
86 /**
87 * Proxy for a derived type (with supertype).
88 * T: the class to proxy for.
89 * S: the supertype.
90 * Requires T, S to have a static const std::string TYPENAME.
91 */
97 }
100 }
103 }
104 };
105 }