Class GorgonAnimationCodecPlugIn
A plug in for allowing users to supply their own 3rd party animation codecs.
Implements
Inherited Members
Namespace: Gorgon.IO
Assembly: Gorgon.IO.Gorgon2D.dll
Syntax
public abstract class GorgonAnimationCodecPlugIn : GorgonPlugIn, IGorgonNamedObject
Constructors
| Edit this page View SourceGorgonAnimationCodecPlugIn(string)
Initializes a new instance of the GorgonAnimationCodecPlugIn class.
Declaration
protected GorgonAnimationCodecPlugIn(string description)
Parameters
Type | Name | Description |
---|---|---|
string | description | Optional description of the plugin. |
Remarks
Objects that implement this base class should pass in a hard coded description on the base constructor.
Properties
| Edit this page View SourceCodecs
Property to return the names of the available codecs for this plug in.
Declaration
public abstract IReadOnlyList<GorgonAnimationCodecDescription> Codecs { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<GorgonAnimationCodecDescription> |
Remarks
This returns a IReadOnlyDictionary<TKey, TValue> containing the name of the plug in as its key, and an optional friendly description as its value.
Methods
| Edit this page View SourceCreateCodec(string, Gorgon2D)
Function to create a new image codec object.
Declaration
public IGorgonAnimationCodec CreateCodec(string codec, Gorgon2D renderer)
Parameters
Type | Name | Description |
---|---|---|
string | codec | The name of the codec to look up within the plug in. |
Gorgon2D | renderer | The renderer used to retrieve textures. |
Returns
Type | Description |
---|---|
IGorgonAnimationCodec | A new instance of a IGorgonAnimationCodec. |
Remarks
If the codec
is not found within the plug in, then an exception will be thrown. To determine whether the plug in has the desired codec
, check the
Codecs property on the plug in to locate the plug in name.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
ArgumentEmptyException | Thrown when the |
KeyNotFoundException | Thrown when the |
OnCreateCodec(string, Gorgon2D)
Function to create a new IGorgonAnimationCodec.
Declaration
protected abstract IGorgonAnimationCodec OnCreateCodec(string codec, Gorgon2D renderer)
Parameters
Type | Name | Description |
---|---|---|
string | codec | The codec to retrieve from the plug in. |
Gorgon2D | renderer | The renderer used to retrieve textures. |
Returns
Type | Description |
---|---|
IGorgonAnimationCodec | A new IGorgonAnimationCodec object. |
Remarks
Implementors must implement this method to return the codec from the plug in assembly.