mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 07:15:28 +00:00
Added support for obsolete attribute
Functions marked with the obsolete attribute will now add [Obsolete] to the generated output.
This commit is contained in:
parent
b975eccd45
commit
11070bb52a
|
@ -341,7 +341,11 @@ namespace Bind
|
|||
{
|
||||
CreateBody(f, enums);
|
||||
|
||||
if (f.Deprecated && Settings.IsEnabled(Settings.Legacy.AddDeprecationWarnings))
|
||||
if (!String.IsNullOrEmpty(f.Obsolete))
|
||||
{
|
||||
sw.WriteLine("[Obsolete(\"{0}\")]", f.Obsolete);
|
||||
}
|
||||
else if (f.Deprecated && Settings.IsEnabled(Settings.Legacy.AddDeprecationWarnings))
|
||||
{
|
||||
sw.WriteLine("[Obsolete(\"Deprecated in OpenGL {0}\")]", f.DeprecatedVersion);
|
||||
}
|
||||
|
|
|
@ -640,6 +640,12 @@ namespace Bind
|
|||
{
|
||||
Debug.Print("Profile override not yet implemented");
|
||||
}
|
||||
|
||||
var obsolete = function_override.GetAttribute("obsolete", String.Empty);
|
||||
if (!String.IsNullOrEmpty(obsolete))
|
||||
{
|
||||
d.Obsolete = obsolete;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace Bind.Structures
|
|||
Deprecated = d.Deprecated;
|
||||
DeprecatedVersion = d.DeprecatedVersion;
|
||||
EntryPoint = d.EntryPoint;
|
||||
Obsolete = d.Obsolete;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -239,6 +240,7 @@ namespace Bind.Structures
|
|||
public bool Deprecated { get; set; }
|
||||
public string DeprecatedVersion { get; set; }
|
||||
public string EntryPoint { get; set; }
|
||||
public string Obsolete { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -281,6 +281,7 @@ namespace Bind
|
|||
DeprecatedVersion = node.GetAttribute("deprecated", String.Empty).Trim(),
|
||||
Deprecated = !String.IsNullOrEmpty(node.GetAttribute("deprecated", String.Empty)),
|
||||
Extension = node.GetAttribute("extension", String.Empty).Trim() ?? "Core",
|
||||
Obsolete = node.GetAttribute("obsolete", String.Empty).Trim()
|
||||
};
|
||||
if (!extensions.Contains(d.Extension))
|
||||
extensions.Add(d.Extension);
|
||||
|
|
Loading…
Reference in a new issue