using System;
namespace SabreTools.DatFiles
{
///
/// Represents various modifiers that can be applied to a DAT
///
public sealed class DatModifiers : ICloneable
{
#region Fields
///
/// Text to prepend to all outputted lines
///
public string? Prefix { get; set; } = null;
///
/// Text to append to all outputted lines
///
public string? Postfix { get; set; } = null;
///
/// Add a new extension to all items
///
public string? AddExtension { get; set; } = null;
///
/// Remove all item extensions
///
public bool RemoveExtension { get; set; } = false;
///
/// Replace all item extensions
///
public string? ReplaceExtension { get; set; } = null;
///
/// Output the machine name before the item name
///
public bool GameName { get; set; } = false;
///
/// Wrap quotes around the entire line, sans prefix and postfix
///
public bool Quotes { get; set; } = false;
///
/// Use the item name instead of machine name on output
///
public bool UseRomName { get; set; } = false;
///
/// Input depot information
///
public DepotInformation? InputDepot { get; set; } = null;
///
/// Output depot information
///
public DepotInformation? OutputDepot { get; set; } = null;
#endregion
#region Cloning Methods
///
/// Clone the current modifiers
///
public object Clone()
{
return new DatModifiers
{
Prefix = this.Prefix,
Postfix = this.Postfix,
AddExtension = this.AddExtension,
RemoveExtension = this.RemoveExtension,
ReplaceExtension = this.ReplaceExtension,
GameName = this.GameName,
Quotes = this.Quotes,
UseRomName = this.UseRomName,
InputDepot = (DepotInformation?)this.InputDepot?.Clone(),
OutputDepot = (DepotInformation?)this.OutputDepot?.Clone(),
};
}
#endregion
}
}