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 valuetype : 1; /* derives from System.ValueType */
43 guint enumtype : 1; /* derives from System.Enum */
44 guint ghcimpl : 1; /* class has its own GetHashCode impl */
49 GList *nested_classes;
50 GList *subclasses; /* list of all subclasses */
53 const char *name_space;
55 guint interface_count;
56 guint interface_id; /* unique inderface id (for interfaces) */
57 guint max_interface_id;
58 gint *interface_offsets;
59 MonoClass **interfaces;
62 * Computed object instance size, total.
66 int vtable_size; /* number of slots */
69 * relative numbering for fast type checking
75 * From the TypeDef table
81 } field, method, property, event;
84 * Field information: Type and location from object base
86 MonoClassField *fields;
88 MonoProperty *properties;
94 /* The underlying type of the enum */
95 MonoType *enum_basetype;
96 /* element class for arrays and enum */
97 MonoClass *element_class;
101 /* used as the type of the this argument and when passing the arg by value */
105 void *reflection_info;
107 MonoMethod *vtable [0];
112 MonoDomain *domain; /* each object/vtable belongs to exactly one domain */
113 gpointer *interface_offsets;
119 typedef gpointer (*MonoTrampoline) (MonoMethod *method);
120 typedef void (*MonoRuntimeClassInit) (MonoClass *klass);
123 mono_class_get (MonoImage *image, guint32 type_token);
126 mono_class_init (MonoClass *klass);
129 mono_class_vtable (MonoDomain *domain, MonoClass *class);
132 mono_class_setup_mono_type (MonoClass *class);
135 mono_class_setup_parent (MonoClass *class, MonoClass *parent);
138 mono_class_from_name (MonoImage *image, const char* name_space, const char *name);
141 mono_field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass);
144 mono_array_class_get (MonoType *element_type, guint32 rank);
147 mono_class_get_field (MonoClass *klass, guint32 field_token);
150 mono_class_get_field_from_name (MonoClass *klass, const char *name);
153 mono_array_element_size (MonoClass *ac);
156 mono_class_instance_size (MonoClass *klass);
159 mono_class_value_size (MonoClass *klass, guint32 *align);
162 mono_class_data_size (MonoClass *klass);
165 mono_class_from_mono_type (MonoType *type);
168 mono_ldtoken (MonoImage *image, guint32 token, MonoClass **retclass);
171 mono_install_trampoline (MonoTrampoline func);
174 mono_install_runtime_class_init (MonoRuntimeClassInit func);
176 #endif /* _MONO_CLI_CLASS_H_ */