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->type_token == 0)
10 #define MONO_CLASS_STATIC_FIELDS_BASE(c) (c->data)
17 /* add marshal data, too */
31 guint dummy : 1; /* temorary hack */
33 guint valuetype : 1; /* derives from System.ValueType */
34 guint enumtype : 1; /* derives from System.Enum */
39 GList *subclasses; /* list of all subclasses */
42 const char *name_space;
44 guint interface_id; /* unique inderface id (for interfaces) */
45 guint max_interface_id;
46 gpointer *interface_offsets;
47 guint interface_count;
48 MonoClass **interfaces;
51 * Computed object instance size, total.
55 int vtable_size; /* number of slots */
58 * relative numbering for fast type checking
64 * From the TypeDef table
70 } field, method, property;
73 * Field information: Type and location from object base
75 MonoClassField *fields;
77 MonoProperty *properties;
81 /* The underlying type of the enum */
82 MonoType *enum_basetype;
84 MonoClass *element_class; /* element class */
85 guint32 rank; /* array dimension */
87 /* used as the type of the this argument and when passing the arg by value */
96 typedef gpointer (*MonoTrampoline) (MonoMethod *method);
97 typedef void (*MonoRuntimeClassInit) (MonoClass *klass);
100 mono_class_get (MonoImage *image, guint32 type_token);
103 mono_class_init (MonoClass *klass);
106 mono_class_from_name (MonoImage *image, const char* name_space, const char *name);
109 mono_field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass);
112 mono_array_class_get (MonoClass *eclass, guint32 rank);
115 mono_class_get_field (MonoClass *klass, guint32 field_token);
118 mono_class_get_field_from_name (MonoClass *klass, const char *name);
121 mono_array_element_size (MonoClass *ac);
124 mono_class_instance_size (MonoClass *klass);
127 mono_class_value_size (MonoClass *klass, guint32 *align);
130 mono_class_data_size (MonoClass *klass);
133 mono_class_from_mono_type (MonoType *type);
136 mono_ldtoken (MonoImage *image, guint32 token, MonoClass **retclass);
139 mono_install_trampoline (MonoTrampoline func);
142 mono_install_runtime_class_init (MonoRuntimeClassInit func);
144 #endif /* _MONO_CLI_CLASS_H_ */