2012-08-16 07:30:59 +00:00
|
|
|
|
#region Using Statements
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using ANX.Framework.Graphics;
|
2015-04-08 14:50:03 +02:00
|
|
|
|
using ANX.Framework.NonXNA.Development;
|
2012-08-16 07:30:59 +00:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
|
|
|
|
|
|
|
|
|
namespace ANX.Framework.Content.Pipeline
|
|
|
|
|
{
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
2012-08-17 14:16:58 +00:00
|
|
|
|
public abstract class ContentProcessorContext
|
2012-08-16 07:30:59 +00:00
|
|
|
|
{
|
2012-08-17 14:16:58 +00:00
|
|
|
|
public ContentProcessorContext()
|
2012-08-16 07:30:59 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract string BuildConfiguration { get; }
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract string IntermediateDirectory { get; }
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract ContentBuildLogger Logger { get; }
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public abstract string OutputDirectory { get; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public abstract string OutputFilename { get; }
|
|
|
|
|
|
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract OpaqueDataDictionary Parameters { get; }
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract TargetPlatform TargetPlatform { get; }
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract GraphicsProfile TargetProfile { get; }
|
|
|
|
|
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract void AddDependency(string filename);
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract void AddOutputFile(string filename);
|
|
|
|
|
|
|
|
|
|
public TOutput BuildAndLoadAsset<TInput, TOutput>(ExternalReference<TInput> sourceAsset, string processorName)
|
|
|
|
|
{
|
2015-04-08 14:50:03 +02:00
|
|
|
|
return this.BuildAndLoadAsset<TInput, TOutput>(sourceAsset, processorName, null, null);
|
2012-08-16 07:30:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract TOutput BuildAndLoadAsset<TInput, TOutput>(ExternalReference<TInput> sourceAsset, string processorName, OpaqueDataDictionary processorParameters, string importerName);
|
|
|
|
|
|
|
|
|
|
public ExternalReference<TOutput> BuildAsset<TInput, TOutput>(ExternalReference<TInput> sourceAsset, string processorName)
|
|
|
|
|
{
|
2015-04-08 14:50:03 +02:00
|
|
|
|
return this.BuildAsset<TInput, TOutput>(sourceAsset, processorName, null, null, null);
|
2012-08-16 07:30:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract ExternalReference<TOutput> BuildAsset<TInput, TOutput>(ExternalReference<TInput> sourceAsset, string processorName, OpaqueDataDictionary processorParameters, string importerName, string assetName);
|
2015-04-08 14:50:03 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Converts a content item object using the specified content processor.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="TInput">Type of the input content.</typeparam>
|
|
|
|
|
/// <typeparam name="TOutput">Type of the converted output.</typeparam>
|
|
|
|
|
/// <param name="input">Source content to be converted.</param>
|
|
|
|
|
/// <param name="processorName">Optional processor for this content.</param>
|
|
|
|
|
/// <returns>Reference of the final converted content.</returns>
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public TOutput Convert<TInput, TOutput>(TInput input, string processorName)
|
|
|
|
|
{
|
2015-04-08 14:50:03 +02:00
|
|
|
|
return this.Convert<TInput, TOutput>(input, processorName, null);
|
2012-08-16 07:30:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
2015-04-08 14:50:03 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Converts a content item object using the specified content processor.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="TInput">Type of the input content.</typeparam>
|
|
|
|
|
/// <typeparam name="TOutput">Type of the converted output.</typeparam>
|
|
|
|
|
/// <param name="input">Source content to be converted.</param>
|
|
|
|
|
/// <param name="processorName">Optional processor for this content.</param>
|
|
|
|
|
/// <param name="processorParameters">Optional paramters for the processor.</param>
|
|
|
|
|
/// <returns>Reference of the final converted content.</returns>
|
|
|
|
|
|
2012-08-16 07:30:59 +00:00
|
|
|
|
public abstract TOutput Convert<TInput, TOutput>(TInput input, string processorName, OpaqueDataDictionary processorParameters);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|