diff --git a/Source/Bind/FuncProcessor.cs b/Source/Bind/FuncProcessor.cs index c1967059..0627dadd 100644 --- a/Source/Bind/FuncProcessor.cs +++ b/Source/Bind/FuncProcessor.cs @@ -169,7 +169,8 @@ namespace Bind if (d.ReturnType.CurrentType.Contains("GLenum")) { if ((Settings.Compatibility & Settings.Legacy.ConstIntEnums) == Settings.Legacy.None) - d.ReturnType.QualifiedType = String.Format("{0}.{1}", Settings.EnumsOutput, Settings.CompleteEnumName); + d.ReturnType.QualifiedType = String.Format("{0}{1}{2}", + Settings.EnumsOutput, Settings.NamespaceSeparator, Settings.CompleteEnumName); else d.ReturnType.QualifiedType = "int"; } diff --git a/Source/Bind/Main.cs b/Source/Bind/Main.cs index b59e872d..792eb3d2 100644 --- a/Source/Bind/Main.cs +++ b/Source/Bind/Main.cs @@ -86,6 +86,7 @@ namespace Bind Settings.DefaultOutputPath = "gl"; Settings.DefaultOutputNamespace = "OpenTK"; Settings.EnumsNamespace = ""; + Settings.NamespaceSeparator = "::"; } break; } diff --git a/Source/Bind/Settings.cs b/Source/Bind/Settings.cs index 5911c901..0d7afd3a 100644 --- a/Source/Bind/Settings.cs +++ b/Source/Bind/Settings.cs @@ -35,6 +35,7 @@ namespace Bind public static string FunctionPrefix = "gl"; public static string ConstantPrefix = "GL_"; public static string EnumPrefix = ""; + public static string NamespaceSeparator = "."; public static string ImportsFile = "Core.cs"; public static string DelegatesFile = "Delegates.cs"; @@ -51,14 +52,14 @@ namespace Bind { return normalEnumsClassOverride == null ? - String.IsNullOrEmpty(NestedEnumsClass) ? OutputClass : OutputClass + "." + NestedEnumsClass : + String.IsNullOrEmpty(NestedEnumsClass) ? OutputClass : OutputClass + NamespaceSeparator + NestedEnumsClass : normalEnumsClassOverride; } } public static string AuxEnumsClass { - get { return GLClass + "." + NestedEnumsClass; } + get { return GLClass + NamespaceSeparator + NestedEnumsClass; } } public static string EnumsOutput @@ -66,9 +67,9 @@ namespace Bind get { if ((Compatibility & Legacy.NestedEnums) != Legacy.None) - return OutputNamespace + "." + OutputClass + "." + NestedEnumsClass; + return OutputNamespace + NamespaceSeparator + OutputClass + NamespaceSeparator + NestedEnumsClass; else - return String.IsNullOrEmpty(EnumsNamespace) ? OutputNamespace : OutputNamespace + "." + EnumsNamespace; + return String.IsNullOrEmpty(EnumsNamespace) ? OutputNamespace : OutputNamespace + NamespaceSeparator + EnumsNamespace; } } @@ -77,9 +78,9 @@ namespace Bind get { if ((Compatibility & Legacy.NestedEnums) != Legacy.None) - return OutputNamespace + "." + GLClass + "." + NestedEnumsClass; + return OutputNamespace + NamespaceSeparator + GLClass + NamespaceSeparator + NestedEnumsClass; else - return OutputNamespace + "." + EnumsNamespace; + return OutputNamespace + NamespaceSeparator + EnumsNamespace; } } diff --git a/Source/Bind/Structures/Constant.cs b/Source/Bind/Structures/Constant.cs index da0f7057..3ae17637 100644 --- a/Source/Bind/Structures/Constant.cs +++ b/Source/Bind/Structures/Constant.cs @@ -265,7 +265,7 @@ namespace Bind.Structures return ""; return String.Format("{0} = {1}((int){2}{3})", Name, Unchecked ? "unchecked" : "", - !String.IsNullOrEmpty(Reference) ? Reference + "." : "", Value); + !String.IsNullOrEmpty(Reference) ? Reference + Settings.NamespaceSeparator : "", Value); //return String.Format("{0} = {1}((int){2})", Name, Unchecked ? "unchecked" : "", Value); } diff --git a/Source/Bind/Structures/Delegate.cs b/Source/Bind/Structures/Delegate.cs index 7e5ee11e..d736d74f 100644 --- a/Source/Bind/Structures/Delegate.cs +++ b/Source/Bind/Structures/Delegate.cs @@ -259,7 +259,7 @@ namespace Bind.Structures StringBuilder sb = new StringBuilder(); sb.Append(Settings.DelegatesClass); - sb.Append("."); + sb.Append(Settings.NamespaceSeparator); sb.Append(Settings.FunctionPrefix); sb.Append(Name); sb.Append(Parameters.CallString()); diff --git a/Source/Bind/Structures/Type.cs b/Source/Bind/Structures/Type.cs index 5b1ae471..52ac0e47 100644 --- a/Source/Bind/Structures/Type.cs +++ b/Source/Bind/Structures/Type.cs @@ -58,7 +58,7 @@ namespace Bind.Structures get { if (!String.IsNullOrEmpty(CurrentQualifier)) - return String.Format("{0}.{1}", CurrentQualifier, CurrentType); + return String.Format("{0}{1}{2}", CurrentQualifier, Settings.NamespaceSeparator, CurrentType); else return CurrentType; } @@ -367,11 +367,13 @@ namespace Bind.Structures // Better match: enum.Name == function.Category (e.g. GL_VERSION_1_1 etc) if (enums.ContainsKey(category)) { - QualifiedType = String.Format("{0}.{1}", Settings.EnumsOutput, EnumProcessor.TranslateEnumName(category)); + QualifiedType = String.Format("{0}{1}{2}", Settings.EnumsOutput, + Settings.NamespaceSeparator, EnumProcessor.TranslateEnumName(category)); } else { - QualifiedType = String.Format("{0}.{1}", Settings.EnumsOutput, Settings.CompleteEnumName); + QualifiedType = String.Format("{0}{1}{2}", Settings.EnumsOutput, + Settings.NamespaceSeparator, Settings.CompleteEnumName); } } }