In mcs and gmcs:
[mono.git] / mcs / mcs / roottypes.cs
1 //
2 // roottypes.cs: keeps a tree representation of the generated code
3 //
4 // Author: Miguel de Icaza (miguel@gnu.org)
5 //
6 // Licensed under the terms of the GNU GPL
7 //
8 // (C) 2001 Ximian, Inc (http://www.ximian.com)
9 //
10 //
11
12 using System;
13 using System.Collections;
14 using System.Reflection;
15 using System.Reflection.Emit;
16 using System.IO;
17
18 namespace Mono.CSharp
19 {
20         // <summary>
21         //   We store here all the toplevel types that we have parsed,
22         //   this is the root of all information we have parsed.
23         // </summary>
24         public sealed class RootTypes : TypeContainer
25         {
26                 public RootTypes ()
27                         : base (null, null, MemberName.Null, null, Kind.Root)
28                 {
29                         types = new ArrayList ();
30                 }
31
32                 public override bool IsClsComplianceRequired ()
33                 {
34                         return true;
35                 }
36
37                 public override bool GetClsCompliantAttributeValue ()
38                 {
39                         return CodeGen.Assembly.IsClsCompliant;
40                 }
41
42                 public override string GetSignatureForError ()
43                 {
44                         return "";
45                 }
46
47                 protected override bool AddMemberType (DeclSpace ds)
48                 {
49                         if (!AddToContainer (ds, ds.Name))
50                                 return false;
51                         ds.NamespaceEntry.NS.AddDeclSpace (ds.Basename, ds);
52                         return true;
53                 }
54
55                 public override TypeContainer AddPartial (TypeContainer nextPart, bool is_interface)
56                 {
57                         return AddPartial (nextPart, nextPart.Name, is_interface);
58                 }
59         }
60 }