2 // generic.cs: Support classes for generics to reduce differences from GMCS
5 // Raja R Harinath <rharinath@novell.com>
7 // (C) 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 ();
143 Type IMemberContainer.Type {
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 override string Name {
179 get { throw new NotImplementedException (); }
182 public override string FullName {
183 get { throw new NotImplementedException (); }
186 public TypeParameterExpr (TypeParameter type_parameter, Location loc)
188 throw new NotImplementedException ();
191 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
197 public class TypeParameterName : SimpleName
199 Attributes attributes;
201 public TypeParameterName (string name, Attributes attrs, Location loc)
207 public Attributes OptAttributes {
214 public class ConstructedType : TypeExpr
216 public ConstructedType (FullNamedExpression fname, TypeArguments args, Location l)
218 throw new NotImplementedException ();
221 public ConstructedType (Type t, TypeParameter[] type_params, Location l)
223 throw new NotImplementedException ();
226 public ConstructedType (Type t, TypeArguments args, Location l)
228 throw new NotImplementedException ();
231 public override string Name {
232 get { throw new NotImplementedException (); }
235 public override string FullName {
236 get { throw new NotImplementedException (); }
239 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
241 throw new NotImplementedException ();
244 public bool CheckConstraints (IResolveContext ec)
246 throw new NotImplementedException ();
250 public class GenericMethod : DeclSpace
252 public GenericMethod (NamespaceEntry ns, DeclSpace parent, MemberName name,
253 Expression return_type, Parameters parameters)
254 : base (ns, parent, name, null)
256 throw new NotImplementedException ();
259 public override TypeBuilder DefineType ()
261 throw new NotImplementedException ();
264 public override bool Define ()
266 throw new NotImplementedException ();
269 public bool DefineType (EmitContext ec, MethodBuilder mb,
270 MethodInfo implementing, bool is_override)
272 throw new NotImplementedException ();
275 public void EmitAttributes ()
277 throw new NotImplementedException ();
280 public override bool DefineMembers ()
282 throw new NotImplementedException ();
285 internal static void Error_ParameterNameCollision (Location loc, string name, string collisionWith)
289 public override MemberCache MemberCache {
290 get { throw new NotImplementedException (); }
293 public override AttributeTargets AttributeTargets {
295 return AttributeTargets.Method | AttributeTargets.ReturnValue;
299 public override string DocCommentHeader {
303 public new void VerifyClsCompliance ()
305 throw new NotImplementedException ();
309 public class TypeArguments
311 public readonly Location Location;
315 //bool has_type_args;
318 public TypeArguments (Location loc)
320 args = new ArrayList ();
324 public TypeArguments (Location loc, params Expression[] types)
327 this.args = new ArrayList (types);
330 public TypeArguments (int dimension, Location loc)
332 this.dimension = dimension;
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 (); }
362 public bool IsUnbound {
363 get { throw new NotImplementedException (); }
366 public TypeParameterName[] GetDeclarations ()
368 throw new NotImplementedException ();
371 public string GetSignatureForError ()
373 throw new NotImplementedException ();
376 public TypeArguments Clone ()
378 throw new NotImplementedException ();
382 public class TypeInferenceContext
384 public void ExactInference (Type u, Type v)
386 throw new NotImplementedException ();
389 public Type InflateGenericArgument (Type t)
391 throw new NotImplementedException ();
395 public class Nullable
397 public class NullCoalescingOperator : Expression
399 public NullCoalescingOperator (Expression left, Expression right, Location loc)
403 public override Expression DoResolve (EmitContext ec)
405 throw new NotImplementedException ();
408 public override void Emit (EmitContext ec)
410 throw new NotImplementedException ();
414 public class LiftedBinaryOperator : Binary
416 public LiftedBinaryOperator (Binary.Operator op, Expression left, Expression right, Location loc)
417 : base (op, left, right)
421 public override Expression DoResolve (EmitContext ec)
423 throw new NotImplementedException ();
426 public override void Emit (EmitContext ec)
428 throw new NotImplementedException ();
432 public class Null : Expression
434 public Null (Type target_type, Location loc)
438 public override Expression DoResolve (EmitContext ec)
440 throw new NotImplementedException ();
443 public override void Emit (EmitContext ec)
445 throw new NotImplementedException ();
449 public class Unwrap : Expression
451 public override Expression DoResolve (EmitContext ec)
453 throw new NotImplementedException ();
456 public override void Emit (EmitContext ec)
458 throw new NotImplementedException ();
462 public class HasValue
464 public static Expression Create (Expression expr, EmitContext ec)
466 throw new NotImplementedException ();