In ilasm/tests:
[mono.git] / mcs / ilasm / codegen / ITypeRef.cs
1 //
2 // Mono.ILASM.BaseTypeRef
3 //
4 // Interface that all Type references must implement
5 //
6 // Author(s):
7 //  Jackson Harper (Jackson@LatitudeGeo.com)
8 //
9 // (C) 2003 Jackson Harper, All rights reserved
10 //
11
12
13 using System;
14 using System.Collections;
15
16 namespace Mono.ILASM {
17
18         public interface ITypeRef {
19
20                 /// <summary>
21                 ///  The full name of the type, <namespace>.<name>
22                 /// ie System.Collections.ArrayList
23                 /// </summary>
24                 string FullName { get; }
25
26                 bool IsPinned { get; }
27                 bool IsRef { get; }
28                 bool IsArray { get; }
29                 bool UseTypeSpec { get; }
30
31                 /// <summary>
32                 ///  The PEAPI.Type of this typeref, this is not guaranteed
33                 ///  to be correct untill after this is resolved.
34                 /// </summary>
35                 PEAPI.Type PeapiType { get; }
36
37                 /// <summary>
38                 ///  Convert this typeref into a zero based array
39                 /// </summary>
40                 void MakeArray ();
41
42                 /// <summary>
43                 ///  Convert this typeref into a bound array. The ArrayList
44                 ///  should be in the format Entry (lower_bound, upper_bound) with
45                 ///  null being used for unset bounds.
46                 /// </summary>
47                 void MakeBoundArray (ArrayList bounds);
48
49                 /// <summary>
50                 ///  Convert this typeref into a reference
51                 /// </summary>
52                 void MakeManagedPointer ();
53
54                 /// <summary>
55                 ///  Convert this typeref into an unmanaged pointer
56                 /// </summary>
57                 void MakeUnmanagedPointer ();
58
59                 /// <summary>
60                 ///  Convert this typeref into a CustomModifiedType
61                 /// </summary>
62                 void MakeCustomModified (CodeGen code_gen,
63                                 PEAPI.CustomModifier modifier, IClassRef klass);
64
65                 /// <summary>
66                 ///  Make this typeref pinned.
67                 /// </summary>
68                 void MakePinned ();
69
70                 void Resolve (CodeGen code_gen);
71
72                 BaseMethodRef GetMethodRef (ITypeRef ret_type, PEAPI.CallConv call_conv,
73                                 string name, ITypeRef[] param, int gen_param_count);
74
75                 IFieldRef GetFieldRef (ITypeRef ret_type, string name);
76
77                 /// <summary>
78                 ///  Convert this typeref to a classref if not possible
79                 ///  throw an exception
80                 /// </summary>
81                 // IClassRef AsClassRef (CodeGen code_gen);
82         }
83
84 }
85