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;
23 public enum SpecialConstraint
30 public abstract class GenericConstraints
32 public bool HasValueTypeConstraint {
34 throw new NotImplementedException ();
38 public abstract string TypeParameter {
42 public bool IsReferenceType {
43 get { throw new NotSupportedException (); }
46 public bool IsValueType {
47 get { throw new NotSupportedException (); }
51 public class Constraints : GenericConstraints
53 public Constraints (string name, ArrayList constraints, Location loc)
57 public Constraints Clone ()
59 throw new NotImplementedException ();
62 public Location Location {
63 get { return Location.Null; }
66 public override string TypeParameter {
67 get { throw new NotImplementedException (); }
70 public void VerifyClsCompliance ()
75 public class TypeParameter : MemberCore, IMemberContainer
77 public TypeParameter (DeclSpace parent, DeclSpace decl, string name,
78 Constraints constraints, Attributes attrs, Variance variance, Location loc)
79 : base (parent, new MemberName (name, loc), attrs)
81 throw new NotImplementedException ();
84 public static string GetSignatureForError (TypeParameter[] tp)
86 throw new NotImplementedException ();
93 public override bool Define ()
98 public override void ApplyAttributeBuilder (Attribute a,
99 CustomAttributeBuilder cb)
101 throw new NotImplementedException ();
104 public override AttributeTargets AttributeTargets {
105 get { throw new NotImplementedException (); }
108 public override string[] ValidAttributeTargets {
110 return new string [] { "type parameter" };
114 public Constraints Constraints {
120 public override string DocCommentHeader {
121 get { throw new NotImplementedException (); }
124 public bool Resolve (DeclSpace ds)
126 throw new NotImplementedException ();
129 public bool DefineType (IResolveContext ec)
131 throw new NotImplementedException ();
134 public bool DefineType (IResolveContext ec, MethodBuilder builder,
135 MethodInfo implementing, bool is_override)
137 throw new NotImplementedException ();
140 public bool CheckDependencies ()
142 throw new NotImplementedException ();
145 public bool UpdateConstraints (IResolveContext ec, Constraints new_constraints)
147 throw new NotImplementedException ();
155 get { throw new NotImplementedException (); }
158 string IMemberContainer.Name {
159 get { throw new NotImplementedException (); }
162 public Variance Variance {
163 get { throw new NotImplementedException (); }
166 MemberCache IMemberContainer.BaseCache {
167 get { throw new NotImplementedException (); }
170 bool IMemberContainer.IsInterface {
171 get { throw new NotImplementedException (); }
174 MemberList IMemberContainer.GetMembers (MemberTypes mt, BindingFlags bf)
176 throw new NotImplementedException ();
179 public bool IsSubclassOf (Type t)
181 throw new NotImplementedException ();
184 public MemberList FindMembers (MemberTypes mt, BindingFlags bf,
185 MemberFilter filter, object criteria)
187 throw new NotImplementedException ();
191 public class TypeParameterExpr : TypeExpr
193 public TypeParameterExpr (TypeParameter type_parameter, Location loc)
195 throw new NotImplementedException ();
198 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
203 public TypeParameter TypeParameter {
205 throw new NotImplementedException ();
210 public class TypeParameterName : SimpleName
212 Attributes attributes;
215 public TypeParameterName (string name, Attributes attrs, Location loc)
216 : this (name, attrs, Variance.None, loc)
220 public TypeParameterName (string name, Attributes attrs, Variance variance, Location loc)
224 this.variance = variance;
227 public Attributes OptAttributes {
233 public Variance Variance {
240 public class GenericTypeExpr : TypeExpr
242 public GenericTypeExpr (DeclSpace t, Location l)
244 throw new NotImplementedException ();
247 public GenericTypeExpr (Type t, TypeArguments args, Location l)
249 throw new NotImplementedException ();
252 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
254 throw new NotImplementedException ();
257 public bool CheckConstraints (IResolveContext ec)
259 throw new NotImplementedException ();
262 public bool VerifyVariantTypeParameters ()
264 throw new NotImplementedException ();
268 public class GenericMethod : DeclSpace
270 public GenericMethod (NamespaceEntry ns, DeclSpace parent, MemberName name,
271 Expression return_type, ParametersCompiled parameters)
272 : base (ns, parent, name, null)
274 throw new NotImplementedException ();
277 public override TypeBuilder DefineType ()
279 throw new NotImplementedException ();
282 public override bool Define ()
284 throw new NotImplementedException ();
287 public bool DefineType (EmitContext ec, MethodBuilder mb,
288 MethodInfo implementing, bool is_override)
290 throw new NotImplementedException ();
293 public void EmitAttributes ()
295 throw new NotImplementedException ();
298 internal static void Error_ParameterNameCollision (Location loc, string name, string collisionWith)
302 public override MemberCache MemberCache {
303 get { throw new NotImplementedException (); }
306 public override AttributeTargets AttributeTargets {
308 return AttributeTargets.Method | AttributeTargets.ReturnValue;
312 public override string DocCommentHeader {
316 public new void VerifyClsCompliance ()
318 throw new NotImplementedException ();
322 public class TypeArguments
326 public TypeArguments ()
328 args = new ArrayList ();
331 public TypeArguments (params Expression[] types)
333 args = new ArrayList (types);
336 public void Add (Expression type)
340 public void Add (TypeArguments new_args)
344 public bool Resolve (IResolveContext ec)
346 throw new NotImplementedException ();
349 public Type[] Arguments {
350 get { throw new NotImplementedException (); }
359 public TypeParameterName[] GetDeclarations ()
361 throw new NotImplementedException ();
364 public string GetSignatureForError ()
366 throw new NotImplementedException ();
369 public TypeArguments Clone ()
371 throw new NotImplementedException ();
375 public class TypeInferenceContext
377 public void ExactInference (Type u, Type v)
379 throw new NotImplementedException ();
382 public Type InflateGenericArgument (Type t)
384 throw new NotImplementedException ();