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 abstract string TypeParameter {
29 public bool IsReferenceType {
30 get { throw new NotSupportedException (); }
34 public class Constraints : GenericConstraints
36 public Constraints (string name, ArrayList constraints, Location loc)
40 public Constraints Clone ()
42 throw new NotImplementedException ();
45 public Location Location {
46 get { return Location.Null; }
49 public override string TypeParameter {
50 get { throw new NotImplementedException (); }
53 public void VerifyClsCompliance ()
58 public class TypeParameter : MemberCore, IMemberContainer
60 public TypeParameter (DeclSpace parent, DeclSpace decl, string name,
61 Constraints constraints, Attributes attrs, Location loc)
62 : base (parent, new MemberName (name, loc), attrs)
64 throw new NotImplementedException ();
67 public static string GetSignatureForError (TypeParameter[] tp)
69 throw new NotImplementedException ();
76 public override bool Define ()
81 public override void ApplyAttributeBuilder (Attribute a,
82 CustomAttributeBuilder cb)
84 throw new NotImplementedException ();
87 public override AttributeTargets AttributeTargets {
88 get { throw new NotImplementedException (); }
91 public override string[] ValidAttributeTargets {
93 return new string [] { "type parameter" };
97 public Constraints Constraints {
103 public override string DocCommentHeader {
104 get { throw new NotImplementedException (); }
107 public bool Resolve (DeclSpace ds)
109 throw new NotImplementedException ();
112 public bool DefineType (IResolveContext ec)
114 throw new NotImplementedException ();
117 public bool DefineType (IResolveContext ec, MethodBuilder builder,
118 MethodInfo implementing, bool is_override)
120 throw new NotImplementedException ();
123 public bool CheckDependencies ()
125 throw new NotImplementedException ();
128 public bool UpdateConstraints (IResolveContext ec, Constraints new_constraints)
130 throw new NotImplementedException ();
137 Type IMemberContainer.Type {
138 get { throw new NotImplementedException (); }
141 string IMemberContainer.Name {
142 get { throw new NotImplementedException (); }
145 MemberCache IMemberContainer.BaseCache {
146 get { throw new NotImplementedException (); }
149 bool IMemberContainer.IsInterface {
150 get { throw new NotImplementedException (); }
153 MemberList IMemberContainer.GetMembers (MemberTypes mt, BindingFlags bf)
155 throw new NotImplementedException ();
158 public bool IsSubclassOf (Type t)
160 throw new NotImplementedException ();
163 public MemberList FindMembers (MemberTypes mt, BindingFlags bf,
164 MemberFilter filter, object criteria)
166 throw new NotImplementedException ();
170 public class TypeParameterExpr : TypeExpr
172 public override string Name {
173 get { throw new NotImplementedException (); }
176 public override string FullName {
177 get { throw new NotImplementedException (); }
180 public TypeParameterExpr (TypeParameter type_parameter, Location loc)
182 throw new NotImplementedException ();
185 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
191 public class TypeParameterName : SimpleName
193 Attributes attributes;
195 public TypeParameterName (string name, Attributes attrs, Location loc)
201 public Attributes OptAttributes {
208 public class ConstructedType : TypeExpr
210 public ConstructedType (FullNamedExpression fname, TypeArguments args, Location l)
212 throw new NotImplementedException ();
215 public ConstructedType (Type t, TypeParameter[] type_params, Location l)
217 throw new NotImplementedException ();
220 public ConstructedType (Type t, TypeArguments args, Location l)
222 throw new NotImplementedException ();
225 public override string Name {
226 get { throw new NotImplementedException (); }
229 public override string FullName {
230 get { throw new NotImplementedException (); }
233 protected override TypeExpr DoResolveAsTypeStep (IResolveContext ec)
235 throw new NotImplementedException ();
238 public bool CheckConstraints (IResolveContext ec)
240 throw new NotImplementedException ();
244 public class GenericMethod : DeclSpace
246 public GenericMethod (NamespaceEntry ns, DeclSpace parent, MemberName name,
247 Expression return_type, Parameters parameters)
248 : base (ns, parent, name, null)
250 throw new NotImplementedException ();
253 public override TypeBuilder DefineType ()
255 throw new NotImplementedException ();
258 public override bool Define ()
260 throw new NotImplementedException ();
263 public bool DefineType (EmitContext ec, MethodBuilder mb,
264 MethodInfo implementing, bool is_override)
266 throw new NotImplementedException ();
269 public void EmitAttributes ()
271 throw new NotImplementedException ();
274 public override bool DefineMembers ()
276 throw new NotImplementedException ();
279 internal static void Error_ParameterNameCollision (Location loc, string name, string collisionWith)
283 public override MemberCache MemberCache {
284 get { throw new NotImplementedException (); }
287 public override AttributeTargets AttributeTargets {
289 return AttributeTargets.Method | AttributeTargets.ReturnValue;
293 public override string DocCommentHeader {
297 public new void VerifyClsCompliance ()
299 throw new NotImplementedException ();
303 public class TypeArguments
305 public readonly Location Location;
309 //bool has_type_args;
312 public TypeArguments (Location loc)
314 args = new ArrayList ();
318 public TypeArguments (Location loc, params Expression[] types)
321 this.args = new ArrayList (types);
324 public TypeArguments (int dimension, Location loc)
326 this.dimension = dimension;
330 public void Add (Expression type)
334 public void Add (TypeArguments new_args)
338 public bool Resolve (IResolveContext ec)
340 throw new NotImplementedException ();
343 public Type[] Arguments {
344 get { throw new NotImplementedException (); }
356 public bool IsUnbound {
357 get { throw new NotImplementedException (); }
360 public TypeParameterName[] GetDeclarations ()
362 throw new NotImplementedException ();
365 public string GetSignatureForError ()
367 throw new NotImplementedException ();
370 public TypeArguments Clone ()
372 throw new NotImplementedException ();
376 public class TypeInferenceContext
378 public void ExactInference (Type u, Type v)
380 throw new NotImplementedException ();
383 public Type InflateGenericArgument (Type t)
385 throw new NotImplementedException ();
389 public class Nullable
391 public class NullCoalescingOperator : Expression
393 public NullCoalescingOperator (Expression left, Expression right, Location loc)
397 public override Expression DoResolve (EmitContext ec)
399 throw new NotImplementedException ();
402 public override void Emit (EmitContext ec)
404 throw new NotImplementedException ();
408 public class HasValue
410 public static Expression Create (Expression expr, EmitContext ec)
412 throw new NotImplementedException ();