Fixed generic parameter definitions.
This commit is contained in:
parent
72123730e4
commit
1a8177dc8f
1 changed files with 21 additions and 30 deletions
|
@ -93,25 +93,6 @@ namespace Bind
|
|||
File.Move(file, dest);
|
||||
}
|
||||
|
||||
static void WriteWrapper(Function f, BindStreamWriter sw)
|
||||
{
|
||||
var parameters = GenerateParameterString(f);
|
||||
var generic_parameters = GenerateGenericParameterString(f);
|
||||
|
||||
if (!String.IsNullOrEmpty(generic_parameters))
|
||||
sw.WriteLine("public static {0} {1}<{2}>({3})", f.ReturnType, f.TrimmedName,
|
||||
generic_parameters, parameters);
|
||||
else
|
||||
sw.WriteLine("public static {0} {1}({2})", f.ReturnType, f.TrimmedName,
|
||||
parameters);
|
||||
|
||||
sw.WriteLine("{");
|
||||
sw.Indent();
|
||||
WriteMethodBody(sw, f);
|
||||
sw.Unindent();
|
||||
sw.WriteLine("}");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WriteDefinitions
|
||||
|
@ -152,15 +133,6 @@ namespace Bind
|
|||
|
||||
#endregion
|
||||
|
||||
static string GetNamespace(string ext)
|
||||
{
|
||||
if (ext == "Core")
|
||||
return Settings.GLClass;
|
||||
else
|
||||
return String.Format("{1}{0}{2}", Settings.NamespaceSeparator,
|
||||
Settings.GLClass, Char.IsDigit(ext[0]) ? DigitPrefix + ext : ext);
|
||||
}
|
||||
|
||||
#region WriteEnums
|
||||
|
||||
public void WriteEnums(BindStreamWriter sw, EnumCollection enums)
|
||||
|
@ -187,6 +159,25 @@ namespace Bind
|
|||
|
||||
#region WriteWrappers
|
||||
|
||||
static void WriteWrapper(Function f, BindStreamWriter sw)
|
||||
{
|
||||
var parameters = GenerateParameterString(f);
|
||||
var generic_parameters = GenerateGenericParameterString(f);
|
||||
|
||||
if (!String.IsNullOrEmpty(generic_parameters))
|
||||
sw.WriteLine("public static {0} <1> {2}({3})", f.ReturnType, generic_parameters,
|
||||
f.TrimmedName, parameters);
|
||||
else
|
||||
sw.WriteLine("public static {0} {1}({2})", f.ReturnType, f.TrimmedName,
|
||||
parameters);
|
||||
|
||||
sw.WriteLine("{");
|
||||
sw.Indent();
|
||||
WriteMethodBody(sw, f);
|
||||
sw.Unindent();
|
||||
sw.WriteLine("}");
|
||||
}
|
||||
|
||||
static void WriteMethodBody(BindStreamWriter sw, Function f)
|
||||
{
|
||||
//var callstring = f.Parameters.CallString();
|
||||
|
|
Loading…
Reference in a new issue