Show / Hide Table of Contents

    Struct CodecElement<TObj, TEnc>

    An encoder/decoder for a specific type of object.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Flame.Ir
    Assembly: Flame.Ir.dll
    Syntax
    public struct CodecElement<TObj, TEnc>
    Type Parameters
    Name Description
    TObj
    TEnc

    Constructors

    | Improve this Doc View Source

    CodecElement(Symbol, Func<TObj, EncoderState, TEnc>, Func<TEnc, DecoderState, TObj>)

    Creates a codec for a specific type of object.

    Declaration
    public CodecElement(Symbol identifier, Func<TObj, EncoderState, TEnc> encode, Func<TEnc, DecoderState, TObj> decode)
    Parameters
    Type Name Description
    Loyc.Symbol identifier

    An identifier for encoded objects.

    System.Func<TObj, EncoderState, TEnc> encode

    A delegate that encodes objects.

    System.Func<TEnc, DecoderState, TObj> decode

    A delegate that decodes objects.

    | Improve this Doc View Source

    CodecElement(String, Func<TObj, EncoderState, TEnc>, Func<TEnc, DecoderState, TObj>)

    Creates a codec for a specific type of object.

    Declaration
    public CodecElement(string identifier, Func<TObj, EncoderState, TEnc> encode, Func<TEnc, DecoderState, TObj> decode)
    Parameters
    Type Name Description
    System.String identifier

    An identifier for encoded objects.

    System.Func<TObj, EncoderState, TEnc> encode

    A delegate that encodes objects.

    System.Func<TEnc, DecoderState, TObj> decode

    A delegate that decodes objects.

    Properties

    | Improve this Doc View Source

    Decode

    Decodes an object's data.

    Declaration
    public Func<TEnc, DecoderState, TObj> Decode { get; }
    Property Value
    Type Description
    System.Func<TEnc, DecoderState, TObj>

    A delegate that decodes objects.

    | Improve this Doc View Source

    Encode

    Encodes an object's data.

    Declaration
    public Func<TObj, EncoderState, TEnc> Encode { get; }
    Property Value
    Type Description
    System.Func<TObj, EncoderState, TEnc>

    A delegate that encodes objects.

    | Improve this Doc View Source

    Identifier

    Gets an identifier for encoded objects.

    Declaration
    public Symbol Identifier { get; }
    Property Value
    Type Description
    Loyc.Symbol

    The encoded object identifier.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX