1 /* $Header: d:/cvsroot/tads/tads3/VMMCREG.H,v 1.2 1999/05/17 02:52:28 MJRoberts Exp $ */
2 
3 /*
4  *   Copyright (c) 1998, 2002 Michael J. Roberts.  All Rights Reserved.
5  *
6  *   Please see the accompanying license file, LICENSE.TXT, for information
7  *   on using and copying this software.
8  */
9 /*
10 Name
11   vmmcreg.h - Metaclass Registry definitions
12 Function
13 
14 Notes
15 
16 Modified
17   12/01/98 MJRoberts  - Creation
18 */
19 
20 #ifndef VMMCREG_H
21 #define VMMCREG_H
22 
23 /* ------------------------------------------------------------------------ */
24 /*
25  *   Define the NORMAL version of the metaclass registration macro.  This
26  *   version is used on all inclusions of metaclass header files in normal
27  *   contexts, and does nothing.
28  *
29  *   This macro is redefined for SPECIAL versions, where metaclass header
30  *   files are included in order to build certain tables, such as the
31  *   central registration table.
32  */
33 #define VM_REGISTER_METACLASS(metaclass)
34 
35 
36 #include "t3std.h"
37 #include "vmtype.h"
38 #include "vmglob.h"
39 
40 /*
41  *   Include all of the core headers first, to ensure that we skip
42  *   everything but the registration macros on subsequent inclusions while
43  *   building the tables.  (Since each header is protected against
44  *   multiple inclusion, except for the registration macros, we need only
45  *   include each file once up front to ensure that these definitions
46  *   won't show up again.)
47  */
48 #include "vmmccore.h"
49 
50 /* ------------------------------------------------------------------------ */
51 /*
52  *   Metaclass registration entry.  Each registered metaclass defines an
53  *   entry like this.
54  */
55 struct vm_meta_reg_t
56 {
57     /*
58      *   The CVmMetaclass object that describes the metaclass
59      */
60     class CVmMetaclass **meta;
61 };
62 
63 /* ------------------------------------------------------------------------ */
64 /*
65  *   Declare the global static table
66  */
67 extern vm_meta_reg_t G_meta_reg_table[];
68 
69 
70 /* ------------------------------------------------------------------------ */
71 /*
72  *   Register metaclasses.  This must be called during VM initialization
73  *   to assign each metaclass its registration index.
74  */
75 void vm_register_metaclasses();
76 
77 
78 #endif /* VMMCREG_H */
79 
80