2 // generic.cs: Support classes for generics to reduce differences from GMCS
5 // Raja R Harinath <rharinath@novell.com>
7 // Copyright 2006 Novell, Inc.
10 using System.Reflection;
11 using System.Reflection.Emit;
12 using System.Collections;
16 public enum SpecialConstraint
23 public abstract class GenericConstraints
25 public bool HasValueTypeConstraint {
27 throw new NotImplementedException ();
31 public abstract string TypeParameter {
35 public bool IsReferenceType {
36 get { throw new NotSupportedException (); }
40 public class Constraints : GenericConstraints
42 public Constraints (string name, ArrayList constraints, Location loc)
46 public Constraints Clone ()
48 throw new NotImplementedException ();
51 public Location Location {
52 get { return Location.Null; }
55 public override string TypeParameter {
56 get { throw new NotImplementedException (); }
59 public void VerifyClsCompliance ()
64 public class TypeParameter : MemberCore, IMemberContainer
66 public TypeParameter (DeclSpace parent, DeclSpace decl, string name,
67 Constraints constraints, Attributes attrs, Location loc)
68 : base (parent, new MemberName (name, loc), attrs)
70 throw new NotImplementedException ();
73 public static string GetSignatureForError (TypeParameter[] tp)
75 throw new NotImplementedException ();
82 public override bool Define ()
87 public override void ApplyAttributeBuilder (Attribute a,
88 CustomAttributeBuilder cb)
90 throw new NotImplementedException ();
93 public override AttributeTargets AttributeTargets {
94 get { throw new NotImplementedException (); }
97 public override string[] ValidAttributeTargets {
99 return new string [] { "type parameter" };
103 public Constraints Constraints {
109 public override string DocCommentHeader {
110 get { throw new NotImplementedException (); }
113 public bool Resolve (DeclSpace ds)
115 throw new NotImplementedException ();
118 public bool DefineType (IResolveContext ec)
120 throw new NotImplementedException ();
123 public bool DefineType (IResolveContext ec, MethodBuilder builder,
124 MethodInfo implementing, bool is_override)
126 throw new NotImplementedException ();
129 public bool CheckDependencies ()
131 throw new NotImplementedException ();
134 public bool UpdateConstraints (IResolveContext ec, Constraints new_constraints)
136 throw new NotImplementedException ();
144 get { throw new NotImplementedException (); }
147 string IMemberContainer.Name {
148 get { throw new NotImplementedException (); }
151 MemberCache IMemberContainer.BaseCache {
152 get { throw new NotImplementedException (); }
155 bool IMemberContainer.IsInterface {
156 get { throw new NotImplementedException (); }
159 MemberList IMemberContainer.GetMembers (MemberTypes mt, BindingFlags bf)
161 throw new NotImplementedException ();
164 public bool IsSubclassOf (Type t)
166 throw new NotImplementedException ();
169 public MemberList FindMembers (MemberTypes mt, BindingFlags bf,
170 MemberFilter filter, object criteria)
172 throw new NotImplementedException ();
176 public class TypeParameterExpr : TypeExpr
178 public TypeParameterExpr (TypeParameter type_parameter, Location loc)
180 throw new NotImplementedException ();
183 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
188 public TypeParameter TypeParameter {
190 throw new NotImplementedException ();
195 public class TypeParameterName : SimpleName
197 Attributes attributes;
199 public TypeParameterName (string name, Attributes attrs, Location loc)
205 public Attributes OptAttributes {
212 public class ConstructedType : TypeExpr
214 public ConstructedType (FullNamedExpression fname, TypeArguments args, Location l)
216 throw new NotImplementedException ();
219 public ConstructedType (Type t, TypeParameter[] type_params, Location l)
221 throw new NotImplementedException ();
224 public ConstructedType (Type t, TypeArguments args, Location l)
226 throw new NotImplementedException ();
229 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
231 throw new NotImplementedException ();
234 public bool CheckConstraints (IResolveContext ec)
236 throw new NotImplementedException ();
240 public class GenericMethod : DeclSpace
242 public GenericMethod (NamespaceEntry ns, DeclSpace parent, MemberName name,
243 Expression return_type, Parameters parameters)
244 : base (ns, parent, name, null)
246 throw new NotImplementedException ();
249 public override TypeBuilder DefineType ()
251 throw new NotImplementedException ();
254 public override bool Define ()
256 throw new NotImplementedException ();
259 public bool DefineType (EmitContext ec, MethodBuilder mb,
260 MethodInfo implementing, bool is_override)
262 throw new NotImplementedException ();
265 public void EmitAttributes ()
267 throw new NotImplementedException ();
270 internal static void Error_ParameterNameCollision (Location loc, string name, string collisionWith)
274 public override MemberCache MemberCache {
275 get { throw new NotImplementedException (); }
278 public override AttributeTargets AttributeTargets {
280 return AttributeTargets.Method | AttributeTargets.ReturnValue;
284 public override string DocCommentHeader {
288 public new void VerifyClsCompliance ()
290 throw new NotImplementedException ();
294 public class TypeArguments
296 public readonly Location Location;
300 //bool has_type_args;
303 public TypeArguments (Location loc)
305 args = new ArrayList ();
309 public TypeArguments (Location loc, params Expression[] types)
312 this.args = new ArrayList (types);
315 public TypeArguments (int dimension, Location loc)
317 this.dimension = dimension;
321 public void Add (Expression type)
325 public void Add (TypeArguments new_args)
329 public bool Resolve (IResolveContext ec)
331 throw new NotImplementedException ();
334 public Type[] Arguments {
335 get { throw new NotImplementedException (); }
347 public bool IsUnbound {
348 get { throw new NotImplementedException (); }
351 public TypeParameterName[] GetDeclarations ()
353 throw new NotImplementedException ();
356 public string GetSignatureForError ()
358 throw new NotImplementedException ();
361 public TypeArguments Clone ()
363 throw new NotImplementedException ();
367 public class TypeInferenceContext
369 public void ExactInference (Type u, Type v)
371 throw new NotImplementedException ();
374 public Type InflateGenericArgument (Type t)
376 throw new NotImplementedException ();