Gorgon
Show / Hide Table of Contents

Class GorgonAnimationCodecPlugIn

A plug in for allowing users to supply their own 3rd party animation codecs.

Inheritance
object
GorgonPlugIn
GorgonAnimationCodecPlugIn
Implements
IGorgonNamedObject
Inherited Members
GorgonPlugIn.Name
GorgonPlugIn.Assembly
GorgonPlugIn.PlugInPath
GorgonPlugIn.Description
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.IO
Assembly: Gorgon.IO.Gorgon2D.dll
Syntax
public abstract class GorgonAnimationCodecPlugIn : GorgonPlugIn, IGorgonNamedObject

Constructors

| Edit this page View Source

GorgonAnimationCodecPlugIn(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 Source

Codecs

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 Source

CreateCodec(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 codec, or the renderer parameter is null.

ArgumentEmptyException

Thrown when the codec parameter is empty.

KeyNotFoundException

Thrown when the codec was not found in this plug in.

| Edit this page View Source

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.

Implements

IGorgonNamedObject

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author