Applied Barlog's "arrange this qualifier" patch.
This commit is contained in:
parent
ccc4f5291b
commit
d09c341dc5
9 changed files with 49 additions and 49 deletions
|
@ -76,7 +76,7 @@ namespace Bind.GL2
|
|||
Function.Initialize();
|
||||
Delegate.Initialize(glSpec, glSpecExt);
|
||||
|
||||
this.WriteBindings(
|
||||
WriteBindings(
|
||||
Delegate.Delegates,
|
||||
Function.Wrappers,
|
||||
Enum.GLEnums);
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace Bind.Glu
|
|||
Trace.WriteLine("Processing specs, please wait...");
|
||||
//this.Translate();
|
||||
|
||||
this.WriteBindings(
|
||||
WriteBindings(
|
||||
Delegate.Delegates,
|
||||
Function.Wrappers,
|
||||
Enum.GLEnums);
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace Bind.Glx
|
|||
Trace.WriteLine("Processing specs, please wait...");
|
||||
//this.Translate();
|
||||
|
||||
this.WriteBindings(
|
||||
WriteBindings(
|
||||
Delegate.Delegates,
|
||||
Function.Wrappers,
|
||||
Enum.GLEnums);
|
||||
|
|
|
@ -72,11 +72,11 @@ namespace Bind.Structures
|
|||
|
||||
public Delegate(Delegate d)
|
||||
{
|
||||
this.Category = d.Category;
|
||||
this.Name = d.Name;
|
||||
this.Parameters = new ParameterCollection(d.Parameters);
|
||||
this.ReturnType = new Type(d.ReturnType);
|
||||
this.Version = d.Version;
|
||||
Category = d.Category;
|
||||
Name = d.Name;
|
||||
Parameters = new ParameterCollection(d.Parameters);
|
||||
ReturnType = new Type(d.ReturnType);
|
||||
Version = d.Version;
|
||||
//this.Version = !String.IsNullOrEmpty(d.Version) ? new string(d.Version.ToCharArray()) : "";
|
||||
}
|
||||
|
||||
|
@ -525,7 +525,7 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
ReturnType.Translate(overrides, this.Category);
|
||||
ReturnType.Translate(overrides, Category);
|
||||
|
||||
if (ReturnType.CurrentType.ToLower().Contains("void") && ReturnType.Pointer != 0)
|
||||
{
|
||||
|
@ -581,7 +581,7 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
Parameters[i].Translate(overrides, this.Category);
|
||||
Parameters[i].Translate(overrides, Category);
|
||||
if (Parameters[i].CurrentType == "UInt16" && Name.Contains("LineStipple"))
|
||||
Parameters[i].WrapperType = WrapperTypes.UncheckedParameter;
|
||||
|
||||
|
@ -627,9 +627,9 @@ namespace Bind.Structures
|
|||
{
|
||||
public void Add(Delegate d)
|
||||
{
|
||||
if (!this.ContainsKey(d.Name))
|
||||
if (!ContainsKey(d.Name))
|
||||
{
|
||||
this.Add(d.Name, d);
|
||||
Add(d.Name, d);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -224,7 +224,7 @@ namespace Bind.Structures
|
|||
// Translate enum names.
|
||||
{
|
||||
List<string> keys_to_update = new List<string>();
|
||||
foreach (Enum e in this.Values)
|
||||
foreach (Enum e in Values)
|
||||
{
|
||||
string name = e.Name;
|
||||
|
||||
|
@ -249,14 +249,14 @@ namespace Bind.Structures
|
|||
foreach (string name in keys_to_update)
|
||||
{
|
||||
Enum e = this[name];
|
||||
this.Remove(name);
|
||||
this.Add(e.Name, e);
|
||||
Remove(name);
|
||||
Add(e.Name, e);
|
||||
}
|
||||
|
||||
keys_to_update = null;
|
||||
}
|
||||
|
||||
foreach (Enum e in this.Values)
|
||||
foreach (Enum e in Values)
|
||||
{
|
||||
XPathNavigator enum_override = overrides.CreateNavigator().SelectSingleNode(String.Format(path, e.Name));
|
||||
foreach (Constant c in e.ConstantCollection.Values)
|
||||
|
@ -283,7 +283,7 @@ namespace Bind.Structures
|
|||
// In this case try searching all enums for the correct constant to alias (stupid opengl specs).
|
||||
if (String.IsNullOrEmpty(c.Reference) && !Char.IsDigit(c.Value[0]))
|
||||
{
|
||||
foreach (Enum @enum in this.Values)
|
||||
foreach (Enum @enum in Values)
|
||||
{
|
||||
// Skip generic GLenum
|
||||
if (@enum.Name == "GLenum")
|
||||
|
@ -299,7 +299,7 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
foreach (Enum e in this.Values)
|
||||
foreach (Enum e in Values)
|
||||
{
|
||||
restart:
|
||||
foreach (Constant c in e.ConstantCollection.Values)
|
||||
|
@ -320,7 +320,7 @@ namespace Bind.Structures
|
|||
|
||||
List<Constant> removed_tokens = new List<Constant>();
|
||||
|
||||
foreach (Enum e in this.Values)
|
||||
foreach (Enum e in Values)
|
||||
{
|
||||
if (e.Name == "All")
|
||||
continue;
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace Bind.Structures
|
|||
public Function(Function f)
|
||||
: this((Delegate)f)
|
||||
{
|
||||
this.Body = new FunctionBody(f.Body);
|
||||
Body = new FunctionBody(f.Body);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -73,7 +73,7 @@ namespace Bind.Structures
|
|||
|
||||
public void TurnVoidPointersToIntPtr()
|
||||
{
|
||||
foreach (Parameter p in this.Parameters)
|
||||
foreach (Parameter p in Parameters)
|
||||
{
|
||||
if (p.Pointer != 0 && p.CurrentType == "void")
|
||||
{
|
||||
|
@ -230,9 +230,9 @@ namespace Bind.Structures
|
|||
public bool Equals(Function other)
|
||||
{
|
||||
return
|
||||
!String.IsNullOrEmpty(this.TrimmedName) && !String.IsNullOrEmpty(other.TrimmedName) &&
|
||||
this.TrimmedName == other.TrimmedName &&
|
||||
this.Parameters.ToString(true) == other.Parameters.ToString(true);
|
||||
!String.IsNullOrEmpty(TrimmedName) && !String.IsNullOrEmpty(other.TrimmedName) &&
|
||||
TrimmedName == other.TrimmedName &&
|
||||
Parameters.ToString(true) == other.Parameters.ToString(true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -571,7 +571,7 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
this.Body = f.Body;
|
||||
Body = f.Body;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -603,7 +603,7 @@ namespace Bind.Structures
|
|||
{
|
||||
foreach (string s in fb)
|
||||
{
|
||||
this.Add(s);
|
||||
Add(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -629,16 +629,16 @@ namespace Bind.Structures
|
|||
{
|
||||
foreach (string t in collection)
|
||||
{
|
||||
this.Add(t);
|
||||
Add(t);
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (this.Count == 0)
|
||||
if (Count == 0)
|
||||
return String.Empty;
|
||||
|
||||
StringBuilder sb = new StringBuilder(this.Count);
|
||||
StringBuilder sb = new StringBuilder(Count);
|
||||
|
||||
sb.AppendLine("{");
|
||||
foreach (string s in this)
|
||||
|
@ -661,9 +661,9 @@ namespace Bind.Structures
|
|||
|
||||
public void Add(Function f)
|
||||
{
|
||||
if (!this.ContainsKey(f.Extension))
|
||||
if (!ContainsKey(f.Extension))
|
||||
{
|
||||
this.Add(f.Extension, new List<Function>());
|
||||
Add(f.Extension, new List<Function>());
|
||||
this[f.Extension].Add(f);
|
||||
}
|
||||
else
|
||||
|
@ -676,7 +676,7 @@ namespace Bind.Structures
|
|||
{
|
||||
foreach (Function f in functions)
|
||||
{
|
||||
this.Add(f);
|
||||
Add(f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,12 +41,12 @@ namespace Bind.Structures
|
|||
if (p == null)
|
||||
return;
|
||||
|
||||
this.Name = p.Name;
|
||||
this.Unchecked = p.Unchecked;
|
||||
this.UnmanagedType = p.UnmanagedType;
|
||||
this.Generic = p.Generic;
|
||||
this.Flow = p.Flow;
|
||||
this.cache = p.cache;
|
||||
Name = p.Name;
|
||||
Unchecked = p.Unchecked;
|
||||
UnmanagedType = p.UnmanagedType;
|
||||
Generic = p.Generic;
|
||||
Flow = p.Flow;
|
||||
cache = p.cache;
|
||||
//this.rebuild = false;
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,7 @@ namespace Bind.Structures
|
|||
{
|
||||
foreach (Parameter p in pc)
|
||||
{
|
||||
this.Add(new Parameter(p));
|
||||
Add(new Parameter(p));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -531,7 +531,7 @@ namespace Bind.Structures
|
|||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("(");
|
||||
if (this.Count > 0)
|
||||
if (Count > 0)
|
||||
{
|
||||
foreach (Parameter p in this)
|
||||
{
|
||||
|
@ -576,7 +576,7 @@ namespace Bind.Structures
|
|||
|
||||
sb.Append("(");
|
||||
|
||||
if (this.Count > 0)
|
||||
if (Count > 0)
|
||||
{
|
||||
foreach (Parameter p in this)
|
||||
{
|
||||
|
|
|
@ -54,13 +54,13 @@ namespace Bind.Structures
|
|||
{
|
||||
if (t != null)
|
||||
{
|
||||
this.CurrentType = t.CurrentType;
|
||||
this.PreviousType = t.PreviousType;
|
||||
this.WrapperType = t.WrapperType;
|
||||
this.Array = t.Array;
|
||||
this.Pointer = t.Pointer;
|
||||
this.Reference = t.Reference;
|
||||
this.ElementCount = t.ElementCount;
|
||||
CurrentType = t.CurrentType;
|
||||
PreviousType = t.PreviousType;
|
||||
WrapperType = t.WrapperType;
|
||||
Array = t.Array;
|
||||
Pointer = t.Pointer;
|
||||
Reference = t.Reference;
|
||||
ElementCount = t.ElementCount;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace Bind.Wgl
|
|||
Trace.WriteLine("Processing specs, please wait...");
|
||||
//this.Translate();
|
||||
|
||||
this.WriteBindings(
|
||||
WriteBindings(
|
||||
Delegate.Delegates,
|
||||
Function.Wrappers,
|
||||
Enum.GLEnums);
|
||||
|
|
Loading…
Reference in a new issue