using ANX.Framework.Graphics;
using ANX.Framework.NonXNA.Development;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
namespace ANX.Framework.Content.Pipeline.Tasks
{
///
/// Represents a named collection of values.
///
[Serializable]
public class Configuration : ICloneable
{
public Configuration(string name, TargetPlatform platform)
{
this.Name = name;
this.Platform = platform;
}
public Configuration(string name, TargetPlatform platform, Configuration original)
{
if (original == null)
throw new ArgumentNullException("original");
if (string.IsNullOrEmpty(name))
throw new ArgumentException("name must not be empty.");
this.Name = name;
this.Platform = platform;
this.Profile = original.Profile;
this.CompressContent = original.CompressContent;
this.OutputDirectory = original.OutputDirectory;
}
///
/// Name of the configuration.
///
public string Name { get; private set; }
///
/// The platform the content will be compiled for.
///
public TargetPlatform Platform { get; private set; }
///
/// Target Graphics Profile
///
public GraphicsProfile Profile { get; set; }
///
/// States if the content should be compressed.
/// s can ignore this value if they state so.
///
public bool CompressContent { get; set; }
///
/// The directory where the compiled output will be placed
///
public string OutputDirectory { get; set; }
///
/// Returns true if the configuration is empty.
///
public virtual bool IsEmpty
{
get
{
//Don't check Name and Platform, they are not part of the content but part of the identification.
return CompressContent == false && OutputDirectory == null;
}
}
public virtual object Clone()
{
return new Configuration(this.Name, this.Platform, this);
}
public override string ToString()
{
return string.Format("Name: {0}; Platform: {1}", Name, Platform);
}
}
}