1 #ifndef _MONO_CLI_CLASS_H_
2 #define _MONO_CLI_CLASS_H_
4 #include <mono/metadata/metadata.h>
5 #include <mono/metadata/image.h>
6 #include <mono/metadata/loader.h>
8 #define MONO_CLASS_IS_ARRAY(c) ((c)->rank)
10 extern gboolean mono_print_vtable;
17 /* add marshal data, too */
40 guint dummy : 1; /* temorary hack */
42 guint init_pending : 1;
43 guint size_inited : 1;
44 guint valuetype : 1; /* derives from System.ValueType */
45 guint enumtype : 1; /* derives from System.Enum */
46 guint ghcimpl : 1; /* class has its own GetHashCode impl */
51 GList *nested_classes;
52 GList *subclasses; /* list of all subclasses */
55 const char *name_space;
57 guint interface_count;
58 guint interface_id; /* unique inderface id (for interfaces) */
59 guint max_interface_id;
60 gint *interface_offsets;
61 MonoClass **interfaces;
64 * Computed object instance size, total.
68 int vtable_size; /* number of slots */
71 * relative numbering for fast type checking
77 * From the TypeDef table
83 } field, method, property, event;
86 * Field information: Type and location from object base
88 MonoClassField *fields;
90 MonoProperty *properties;
96 /* The underlying type of the enum */
97 MonoType *enum_basetype;
98 /* element class for arrays and enum */
99 MonoClass *element_class;
100 /* array dimension */
103 /* used as the type of the this argument and when passing the arg by value */
107 void *reflection_info;
109 MonoMethod *vtable [0];
114 MonoDomain *domain; /* each object/vtable belongs to exactly one domain */
115 gpointer *interface_offsets;
121 typedef gpointer (*MonoTrampoline) (MonoMethod *method);
122 typedef void (*MonoRuntimeClassInit) (MonoClass *klass);
125 mono_class_get (MonoImage *image, guint32 type_token);
128 mono_class_init (MonoClass *klass);
131 mono_class_vtable (MonoDomain *domain, MonoClass *class);
134 mono_class_setup_mono_type (MonoClass *class);
137 mono_class_setup_parent (MonoClass *class, MonoClass *parent);
140 mono_class_from_name (MonoImage *image, const char* name_space, const char *name);
143 mono_field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass);
146 mono_array_class_get (MonoType *element_type, guint32 rank);
149 mono_class_get_field (MonoClass *klass, guint32 field_token);
152 mono_class_get_field_from_name (MonoClass *klass, const char *name);
155 mono_array_element_size (MonoClass *ac);
158 mono_class_instance_size (MonoClass *klass);
161 mono_class_value_size (MonoClass *klass, guint32 *align);
164 mono_class_data_size (MonoClass *klass);
167 mono_class_from_mono_type (MonoType *type);
170 mono_ldtoken (MonoImage *image, guint32 token, MonoClass **retclass);
173 mono_install_trampoline (MonoTrampoline func);
176 mono_install_runtime_class_init (MonoRuntimeClassInit func);
178 #endif /* _MONO_CLI_CLASS_H_ */