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 *nested_classes;
40 GList *subclasses; /* list of all subclasses */
43 const char *name_space;
45 guint interface_id; /* unique inderface id (for interfaces) */
46 guint max_interface_id;
47 gpointer *interface_offsets;
48 guint interface_count;
49 MonoClass **interfaces;
52 * Computed object instance size, total.
56 int vtable_size; /* number of slots */
59 * relative numbering for fast type checking
65 * From the TypeDef table
71 } field, method, property;
74 * Field information: Type and location from object base
76 MonoClassField *fields;
78 MonoProperty *properties;
82 /* The underlying type of the enum */
83 MonoType *enum_basetype;
84 /* element class for arrays and enum */
85 MonoClass *element_class;
89 /* used as the type of the this argument and when passing the arg by value */
98 typedef gpointer (*MonoTrampoline) (MonoMethod *method);
99 typedef void (*MonoRuntimeClassInit) (MonoClass *klass);
102 mono_class_get (MonoImage *image, guint32 type_token);
105 mono_class_init (MonoClass *klass);
108 mono_class_from_name (MonoImage *image, const char* name_space, const char *name);
111 mono_field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass);
114 mono_array_class_get (MonoClass *eclass, guint32 rank);
117 mono_class_get_field (MonoClass *klass, guint32 field_token);
120 mono_class_get_field_from_name (MonoClass *klass, const char *name);
123 mono_array_element_size (MonoClass *ac);
126 mono_class_instance_size (MonoClass *klass);
129 mono_class_value_size (MonoClass *klass, guint32 *align);
132 mono_class_data_size (MonoClass *klass);
135 mono_class_from_mono_type (MonoType *type);
138 mono_ldtoken (MonoImage *image, guint32 token, MonoClass **retclass);
141 mono_install_trampoline (MonoTrampoline func);
144 mono_install_runtime_class_init (MonoRuntimeClassInit func);
146 #endif /* _MONO_CLI_CLASS_H_ */