UltimateZoneBuilder/Source/General/Compiler.cs

75 lines
1.5 KiB
C#
Raw Normal View History

2008-11-11 16:19:50 +00:00
#region ================== Copyright (c) 2007 Pascal vd Heiden
/*
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
* This program is released under GNU General Public License
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#endregion
#region ================== Namespaces
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Runtime.InteropServices;
using System.Diagnostics;
#endregion
namespace CodeImp.DoomBuilder.General
{
public abstract class Compiler
{
#region ================== Variables
// Errors
private List<CompilerError> errors;
#endregion
#region ================== Properties
public CompilerError[] Errors { get { return errors.ToArray(); } }
#endregion
#region ================== Constructor
// Constructor
public Compiler()
{
// Initialize
this.errors = new List<CompilerError>();
}
#endregion
#region ================== Methods
/// <summary>
/// This runs the compiler.
/// </summary>
/// <returns>Returns false when failed to start.</returns>
public abstract bool Run();
// This reports an error
protected void ReportError(CompilerError err)
{
this.errors.Add(err);
}
#endregion
}
}