Show / Hide Table of Contents

    Class ConstantCodec

    A codec for constants.

    Inheritance
    System.Object
    Codec<Constant, Loyc.Syntax.LNode>
    ConstantCodec
    Inherited Members
    Codec<Constant, LNode>.Encode(Constant, EncoderState)
    Codec<Constant, LNode>.Decode(LNode, DecoderState)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Flame.Ir
    Assembly: Flame.Ir.dll
    Syntax
    public sealed class ConstantCodec : Codec<Constant, LNode>

    Fields

    | Improve this Doc View Source

    Instance

    An instance of the constant codec.

    Declaration
    public static readonly ConstantCodec Instance
    Field Value
    Type Description
    ConstantCodec

    Methods

    | Improve this Doc View Source

    Decode(LNode, DecoderState)

    Decodes an LNode as a constant value.

    Declaration
    public override Constant Decode(LNode node, DecoderState state)
    Parameters
    Type Name Description
    Loyc.Syntax.LNode node

    The node to decode.

    DecoderState state

    The decoder state to use.

    Returns
    Type Description
    Constant

    A decoded constant.

    Overrides
    Flame.Ir.Codec<Flame.Constant, Loyc.Syntax.LNode>.Decode(Loyc.Syntax.LNode, Flame.Ir.DecoderState)
    | Improve this Doc View Source

    Encode(Constant, EncoderState)

    Encodes a constant value.

    Declaration
    public override LNode Encode(Constant value, EncoderState state)
    Parameters
    Type Name Description
    Constant value

    The value to encode.

    EncoderState state

    The encoder state to use.

    Returns
    Type Description
    Loyc.Syntax.LNode

    An encoded constant value.

    Overrides
    Flame.Ir.Codec<Flame.Constant, Loyc.Syntax.LNode>.Encode(Flame.Constant, Flame.Ir.EncoderState)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX