mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-28 04:15:43 +00:00
e220f3a71a
Removed some unused variables. Added licensing information.
60 lines
1.4 KiB
C#
60 lines
1.4 KiB
C#
#region --- License ---
|
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
* See license.txt for license info
|
|
*/
|
|
#endregion
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.IO;
|
|
using Bind.Structures;
|
|
|
|
namespace Bind
|
|
{
|
|
class BindStreamWriter : StreamWriter
|
|
{
|
|
public BindStreamWriter(string file)
|
|
: base(file)
|
|
{
|
|
}
|
|
|
|
private string indent = "";
|
|
|
|
public void Indent()
|
|
{
|
|
indent = " " + indent;
|
|
}
|
|
|
|
public void Unindent()
|
|
{
|
|
if (!String.IsNullOrEmpty(indent))
|
|
indent = indent.Substring(4);
|
|
}
|
|
|
|
public override void Write(string value)
|
|
{
|
|
base.Write(indent + value);
|
|
}
|
|
|
|
public override void WriteLine(string value)
|
|
{
|
|
base.WriteLine(indent + value);
|
|
}
|
|
|
|
public void Write(Bind.Structures.Enum e)
|
|
{
|
|
StringBuilder sb = new StringBuilder(e.ToString());
|
|
sb.Replace(System.Environment.NewLine, System.Environment.NewLine + indent);
|
|
Write(sb);
|
|
}
|
|
|
|
public void Write(Bind.Structures.Function f)
|
|
{
|
|
StringBuilder sb = new StringBuilder(f.ToString());
|
|
sb.Replace(System.Environment.NewLine, System.Environment.NewLine + indent);
|
|
Write(sb);
|
|
}
|
|
}
|
|
}
|