// // Mono.ILASM.ModifiableType // // Author(s): // Jackson Harper (Jackson@LatitudeGeo.com) // // (C) 2003 Jackson Harper (Jackson@LatitudeGeo.com) // using System; using System.Collections; namespace Mono.ILASM { public abstract class ModifiableType { private ArrayList conversion_list; private bool is_pinned; private bool is_ref; private bool is_array; private bool use_type_spec; private enum ConversionMethod { MakeArray, MakeBoundArray, MakeManagedPointer, MakeUnmanagedPointer, MakeCustomModified } public ModifiableType () { conversion_list = new ArrayList (5); } public abstract string SigMod { get; set; } protected ArrayList ConversionList { get { return conversion_list; } set { conversion_list = value; } } public bool IsPinned { get { return is_pinned; } } public bool IsArray { get { return is_array; } } public bool IsRef { get { return is_ref; } } public bool UseTypeSpec { get { return use_type_spec; } } public void MakeArray () { use_type_spec = true; conversion_list.Add (ConversionMethod.MakeArray); is_array = true; SigMod += "[]"; } public void MakeBoundArray (ArrayList bounds) { use_type_spec = true; conversion_list.Add (ConversionMethod.MakeBoundArray); conversion_list.Add (bounds); is_array = true; SigMod += "["; for (int i=0; i