02fa6a31e6
* generator/*.cs : Move into GtkSharp.Generation namespace. * generator/CodeGenerator.cs (Main): Add usage check. Add SymbolTable. * generator/EnumGen.cs (QualifiedName): New. (Generate): Add SymbolTable to signature. * generator/IGeneratable : Add QualifiedName prop and update Generate signature. * generator/Parser.cs : Switch from plain Hashtable to SymbolTable. (Parse): Replaces the Types property and returns a SymbolTable. * generator/StructBase.cs : New base class to derive struct and object types. Initial implementation of protected GenField method and ctor. * generator/StructGen.cs : New non-object struct type generatable. * generator/SymbolTable.cs : New. Manages complex types hash and a simple types hash. Will provide generic lookup interface. svn path=/trunk/gtk-sharp/; revision=1855
42 lines
722 B
C#
42 lines
722 B
C#
// GtkSharp.Generation.SymbolTable.cs - The Symbol Table Class.
|
|
//
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
//
|
|
// (c) 2001 Mike Kestner
|
|
|
|
namespace GtkSharp.Generation {
|
|
|
|
using System;
|
|
using System.Collections;
|
|
|
|
public class SymbolTable {
|
|
|
|
private Hashtable complex_types = new Hashtable ();
|
|
private Hashtable simple_types;
|
|
|
|
public void AddType (IGeneratable gen)
|
|
{
|
|
complex_types [gen.CName] = gen;
|
|
}
|
|
|
|
public int Count {
|
|
get
|
|
{
|
|
return complex_types.Count;
|
|
}
|
|
}
|
|
|
|
public IDictionaryEnumerator GetEnumerator ()
|
|
{
|
|
return complex_types.GetEnumerator();
|
|
}
|
|
|
|
public String GetCSType (String c_type)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
}
|
|
}
|
|
|