forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more stubbed classes. Added more interfaces.
- Loading branch information
1 parent
10994e8
commit fb817b1
Showing
12 changed files
with
715 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
#region License | ||
/* | ||
Microsoft Public License (Ms-PL) | ||
MonoGame - Copyright © 2012 The MonoGame Team | ||
All rights reserved. | ||
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not | ||
accept the license, do not use the software. | ||
1. Definitions | ||
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under | ||
U.S. copyright law. | ||
A "contribution" is the original software, or any additions or changes to the software. | ||
A "contributor" is any person that distributes its contribution under this license. | ||
"Licensed patents" are a contributor's patent claims that read directly on its contribution. | ||
2. Grant of Rights | ||
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, | ||
each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. | ||
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, | ||
each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. | ||
3. Conditions and Limitations | ||
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. | ||
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, | ||
your patent license from such contributor to the software ends automatically. | ||
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution | ||
notices that are present in the software. | ||
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including | ||
a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object | ||
code form, you may only do so under a license that complies with this license. | ||
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees | ||
or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent | ||
permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular | ||
purpose and non-infringement. | ||
*/ | ||
#endregion License | ||
|
||
using System; | ||
using System.Collections.ObjectModel; | ||
|
||
namespace Microsoft.Xna.Framework.Content.Pipeline | ||
{ | ||
/// <summary> | ||
/// Provides a collection of child objects for a content item. | ||
/// | ||
/// Links from a child object to its parent are maintained as the collection contents are modified. | ||
/// </summary> | ||
/// <typeparam name="TParent"></typeparam> | ||
/// <typeparam name="TChild"></typeparam> | ||
public abstract class ChildCollection<TParent, TChild> : Collection<TChild> | ||
where TParent : class | ||
where TChild : class | ||
{ | ||
/// <summary> | ||
/// Creates an instance of ChildCollection. | ||
/// </summary> | ||
/// <param name="parent">Parent object of the child objects returned in the collection.</param> | ||
protected ChildCollection(TParent parent) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// Removes all children from the collection. | ||
/// </summary> | ||
protected override void ClearItems() | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the parent of a child object. | ||
/// </summary> | ||
/// <param name="child">The child of the parent being retrieved.</param> | ||
/// <returns>The parent of the child object.</returns> | ||
protected abstract TParent GetParent(TChild child); | ||
|
||
/// <summary> | ||
/// Inserts a child object into the collection at the specified location. | ||
/// </summary> | ||
/// <param name="index">The position in the collection.</param> | ||
/// <param name="item">The child object being inserted.</param> | ||
protected override void InsertItem(int index, TChild item) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// Removes a child object from the collection. | ||
/// </summary> | ||
/// <param name="index">The index of the item being removed.</param> | ||
protected override void RemoveItem(int index) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// Modifies the value of the child object at the specified location. | ||
/// </summary> | ||
/// <param name="index">The index of the child object being modified.</param> | ||
/// <param name="item">The new value for the child object.</param> | ||
protected override void SetItem(int index, TChild item) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
/// <summary> | ||
/// Modifies the value of the parent object of the specified child object. | ||
/// </summary> | ||
/// <param name="child">The child of the parent being modified.</param> | ||
/// <param name="parent">The new value for the parent object.</param> | ||
protected abstract void SetParent(TChild child, TParent parent); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#region License | ||
/* | ||
Microsoft Public License (Ms-PL) | ||
MonoGame - Copyright © 2012 The MonoGame Team | ||
All rights reserved. | ||
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not | ||
accept the license, do not use the software. | ||
1. Definitions | ||
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under | ||
U.S. copyright law. | ||
A "contribution" is the original software, or any additions or changes to the software. | ||
A "contributor" is any person that distributes its contribution under this license. | ||
"Licensed patents" are a contributor's patent claims that read directly on its contribution. | ||
2. Grant of Rights | ||
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, | ||
each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. | ||
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, | ||
each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. | ||
3. Conditions and Limitations | ||
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. | ||
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, | ||
your patent license from such contributor to the software ends automatically. | ||
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution | ||
notices that are present in the software. | ||
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including | ||
a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object | ||
code form, you may only do so under a license that complies with this license. | ||
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees | ||
or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent | ||
permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular | ||
purpose and non-infringement. | ||
*/ | ||
#endregion License | ||
|
||
|
||
namespace Microsoft.Xna.Framework.Content.Pipeline | ||
{ | ||
/// <summary> | ||
/// Implements a file format importer for use with game assets. | ||
/// | ||
/// Importers, either provided by the framework or written by a developer, must derive from ContentImporter, as well as being marked with a ContentImporterAttribute. | ||
/// | ||
/// An importer should produce results in the standard intermediate object model. If an asset has information not supported by the object model, the importer should output it as opaque data (key/value attributes attached to the relevant object). By following this procedure, a content pipeline can access specialized digital content creation (DCC) tool information, even when that information has not been fully standardized into the official object model. | ||
/// | ||
/// You can also design custom importers that accept and import types containing specific third-party extensions to the object model. | ||
/// </summary> | ||
public abstract class ContentImporter<T> : IContentImporter | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of ContentImporter. | ||
/// </summary> | ||
protected ContentImporter() | ||
{ | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Called by the framework when importing a game asset. This is the method called by XNA when an asset is to be imported into an object that can be recognized by the Content Pipeline. | ||
/// </summary> | ||
/// <param name="filename">Name of a game asset file.</param> | ||
/// <param name="context">Contains information for importing a game asset, such as a logger interface.</param> | ||
/// <returns>Resulting game asset.</returns> | ||
public abstract T Import(string filename, ContentImporterContext context); | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
MonoGame.Framework.Content.Pipeline/ContentImporterContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
#region License | ||
/* | ||
Microsoft Public License (Ms-PL) | ||
MonoGame - Copyright © 2012 The MonoGame Team | ||
All rights reserved. | ||
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not | ||
accept the license, do not use the software. | ||
1. Definitions | ||
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under | ||
U.S. copyright law. | ||
A "contribution" is the original software, or any additions or changes to the software. | ||
A "contributor" is any person that distributes its contribution under this license. | ||
"Licensed patents" are a contributor's patent claims that read directly on its contribution. | ||
2. Grant of Rights | ||
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, | ||
each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. | ||
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, | ||
each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. | ||
3. Conditions and Limitations | ||
(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. | ||
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, | ||
your patent license from such contributor to the software ends automatically. | ||
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution | ||
notices that are present in the software. | ||
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including | ||
a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object | ||
code form, you may only do so under a license that complies with this license. | ||
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees | ||
or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent | ||
permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular | ||
purpose and non-infringement. | ||
*/ | ||
#endregion License | ||
|
||
|
||
namespace Microsoft.Xna.Framework.Content.Pipeline | ||
{ | ||
/// <summary> | ||
/// Provides properties that define logging behavior for the importer. | ||
/// </summary> | ||
public abstract class ContentImporterContext | ||
{ | ||
/// <summary> | ||
/// The absolute path to the root of the build intermediate (object) directory. | ||
/// </summary> | ||
public abstract string IntermediateDirectory { get; } | ||
|
||
/// <summary> | ||
/// Gets the logger for an importer. | ||
/// </summary> | ||
public abstract ContentBuildLogger Logger { get; } | ||
|
||
/// <summary> | ||
/// The absolute path to the root of the build output (binaries) directory. | ||
/// </summary> | ||
public abstract string OutputDirectory { get; } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of ContentImporterContext. | ||
/// </summary> | ||
public ContentImporterContext() | ||
{ | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Adds a dependency to the specified file. This causes a rebuild of the file, when modified, on subsequent incremental builds. | ||
/// </summary> | ||
/// <param name="filename">Name of an asset file.</param> | ||
public abstract void AddDependency(string filename); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.