2 // Mono.ILASM.TypeManager.cs
5 // Jackson Harper (Jackson@LatitudeGeo.com)
7 // (C) 2003 Jackson Harper, All rights reserved
11 using System.Collections;
13 namespace Mono.ILASM {
15 public class TypeManager {
17 private Hashtable type_table;
18 private CodeGen code_gen;
20 public TypeManager (CodeGen code_gen)
22 this.code_gen = code_gen;
23 type_table = new Hashtable ();
24 Hashtable t = type_table;
27 public TypeDef this[string full_name] {
29 return (TypeDef) type_table[full_name];
32 type_table[full_name] = value;
36 public PEAPI.Type GetPeapiType (string full_name)
38 TypeDef type_def = (TypeDef) type_table[full_name];
43 if (!type_def.IsDefined)
44 type_def.Define (code_gen);
46 return type_def.PeapiType;
49 public void DefineAll ()
51 foreach (TypeDef typedef in type_table.Values) {
52 typedef.Define (code_gen);