2008-05-29 16:44:20 +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 CodeImp.DoomBuilder.IO;
|
|
|
|
using CodeImp.DoomBuilder.Data;
|
|
|
|
using System.IO;
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.Types
|
|
|
|
{
|
|
|
|
internal class TypeHandlerAttribute : Attribute
|
|
|
|
{
|
|
|
|
#region ================== Constants
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Variables
|
|
|
|
|
|
|
|
private int index;
|
2008-05-30 11:05:44 +00:00
|
|
|
private string name;
|
|
|
|
private Type type;
|
|
|
|
private bool customusable;
|
|
|
|
|
2008-05-29 16:44:20 +00:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Properties
|
|
|
|
|
|
|
|
public int Index { get { return index; } }
|
2008-05-30 11:05:44 +00:00
|
|
|
public string Name { get { return name; } }
|
|
|
|
public bool IsCustomUsable { get { return customusable; } }
|
|
|
|
public Type Type { get { return type; } set { type = value; } }
|
|
|
|
|
2008-05-29 16:44:20 +00:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Constructor / Destructor
|
|
|
|
|
|
|
|
// Constructor
|
2008-05-30 11:05:44 +00:00
|
|
|
public TypeHandlerAttribute(int index, string name, bool customusable)
|
2008-05-29 16:44:20 +00:00
|
|
|
{
|
|
|
|
// Initialize
|
|
|
|
this.index = index;
|
2008-05-30 11:05:44 +00:00
|
|
|
this.name = name;
|
|
|
|
this.customusable = customusable;
|
2008-05-29 16:44:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region ================== Methods
|
|
|
|
|
2008-05-30 11:05:44 +00:00
|
|
|
// String representation
|
|
|
|
public override string ToString()
|
|
|
|
{
|
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
2008-05-29 16:44:20 +00:00
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|