2009-04-19 18:07:22 +00:00
|
|
|
#region ================== Namespaces
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Globalization;
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
namespace CodeImp.DoomBuilder.Map
|
|
|
|
{
|
2009-05-21 08:18:34 +00:00
|
|
|
/// <summary>
|
|
|
|
/// List of universal fields and their values.
|
|
|
|
/// </summary>
|
2009-04-19 18:07:22 +00:00
|
|
|
public class UniFields : SortedList<string, UniValue>
|
|
|
|
{
|
2009-06-11 21:21:20 +00:00
|
|
|
// Owner of this list
|
|
|
|
protected MapElement owner;
|
|
|
|
public MapElement Owner { get { return owner; } internal set { owner = value; } }
|
|
|
|
|
2009-04-19 18:07:22 +00:00
|
|
|
// New constructor
|
2009-05-21 08:18:34 +00:00
|
|
|
///<summary></summary>
|
2009-04-19 18:07:22 +00:00
|
|
|
public UniFields() : base(2)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// New constructor
|
2009-05-21 08:18:34 +00:00
|
|
|
///<summary></summary>
|
2009-04-19 18:07:22 +00:00
|
|
|
public UniFields(int capacity) : base(capacity)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// Copy constructor
|
2009-05-21 08:18:34 +00:00
|
|
|
///<summary></summary>
|
2009-04-19 18:07:22 +00:00
|
|
|
public UniFields(UniFields copyfrom) : base(copyfrom)
|
|
|
|
{
|
|
|
|
}
|
2009-06-11 21:21:20 +00:00
|
|
|
|
|
|
|
// New constructor
|
|
|
|
///<summary></summary>
|
|
|
|
public UniFields(MapElement owner) : base(2)
|
|
|
|
{
|
|
|
|
this.owner = owner;
|
|
|
|
}
|
|
|
|
|
|
|
|
// New constructor
|
|
|
|
///<summary></summary>
|
|
|
|
public UniFields(MapElement owner, int capacity) : base(capacity)
|
|
|
|
{
|
|
|
|
this.owner = owner;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Copy constructor
|
|
|
|
///<summary></summary>
|
|
|
|
public UniFields(MapElement owner, UniFields copyfrom) : base(copyfrom)
|
|
|
|
{
|
|
|
|
this.owner = owner;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>Call this before making changes to the fields, or they may not be updated correctly with undo/redo!</summary>
|
|
|
|
public void BeforeFieldsChange()
|
|
|
|
{
|
|
|
|
if(owner != null)
|
|
|
|
owner.BeforeFieldsChange();
|
|
|
|
}
|
2009-04-19 18:07:22 +00:00
|
|
|
}
|
|
|
|
}
|