Search Results for

    Show / Hide Table of Contents

    Class EncoderState

    Encodes Flame's intermediate representation as Loyc LNodes.

    Inheritance
    object
    EncoderState
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Ir
    Assembly: Flame.Ir.dll
    Syntax
    public sealed class EncoderState

    Constructors

    | Edit this page View Source

    EncoderState()

    Instantiates a Flame IR encoder.

    Declaration
    public EncoderState()
    | Edit this page View Source

    EncoderState(IrCodec)

    Instantiates a Flame IR encoder.

    Declaration
    public EncoderState(IrCodec codec)
    Parameters
    Type Name Description
    IrCodec codec

    The codec to use for encoding.

    | Edit this page View Source

    EncoderState(IrCodec, LNodeFactory)

    Instantiates a Flame IR encoder.

    Declaration
    public EncoderState(IrCodec codec, LNodeFactory factory)
    Parameters
    Type Name Description
    IrCodec codec

    The codec to use for encoding.

    LNodeFactory factory

    The node factory to use for creating nodes.

    Properties

    | Edit this page View Source

    Codec

    Gets the codec used by this encoder.

    Declaration
    public IrCodec Codec { get; }
    Property Value
    Type Description
    IrCodec

    A Flame IR codec.

    | Edit this page View Source

    Factory

    Gets the node factory for this encoder.

    Declaration
    public LNodeFactory Factory { get; }
    Property Value
    Type Description
    LNodeFactory

    A node factory.

    Methods

    | Edit this page View Source

    Encode(AttributeMap)

    Encodes an attribute map as a sequence of LNodes.

    Declaration
    public IEnumerable<LNode> Encode(AttributeMap attributes)
    Parameters
    Type Name Description
    AttributeMap attributes

    The attribute map to encode.

    Returns
    Type Description
    IEnumerable<LNode>

    A list of attribute nodes.

    | Edit this page View Source

    Encode(FlowGraph)

    Encodes a control-flow graph.

    Declaration
    public LNode Encode(FlowGraph graph)
    Parameters
    Type Name Description
    FlowGraph graph

    The control-flow graph to encode.

    Returns
    Type Description
    LNode

    An LNode that represents the control-flow graph.

    | Edit this page View Source

    Encode(InstructionPrototype)

    Encodes an instruction prototype.

    Declaration
    public LNode Encode(InstructionPrototype prototype)
    Parameters
    Type Name Description
    InstructionPrototype prototype

    The instruction prototype to encode.

    Returns
    Type Description
    LNode

    An encoded instruction prototype.

    | Edit this page View Source

    Encode(Alignment)

    Encodes an alignment.

    Declaration
    public LNode Encode(Alignment alignment)
    Parameters
    Type Name Description
    Alignment alignment

    Am alignment to encode.

    Returns
    Type Description
    LNode

    The encoded alignment.

    | Edit this page View Source

    Encode(MethodLookup)

    Encodes a method lookup strategy as an LNode.

    Declaration
    public LNode Encode(MethodLookup lookup)
    Parameters
    Type Name Description
    MethodLookup lookup

    A method lookup strategy.

    Returns
    Type Description
    LNode

    An LNode that represents lookup.

    | Edit this page View Source

    Encode(Constant)

    Encodes a constant value.

    Declaration
    public LNode Encode(Constant value)
    Parameters
    Type Name Description
    Constant value

    The value to encode.

    Returns
    Type Description
    LNode

    An encoded constant value.

    | Edit this page View Source

    Encode(IAttribute)

    Encodes an attribute as an LNode.

    Declaration
    public LNode Encode(IAttribute attribute)
    Parameters
    Type Name Description
    IAttribute attribute

    The attribute to encode.

    Returns
    Type Description
    LNode

    An encoded node.

    | Edit this page View Source

    Encode(IField)

    Encodes a field reference.

    Declaration
    public LNode Encode(IField field)
    Parameters
    Type Name Description
    IField field

    The field reference to encode.

    Returns
    Type Description
    LNode

    An encoded field reference.

    | Edit this page View Source

    Encode(IGenericMember)

    Encodes a generic member reference.

    Declaration
    public LNode Encode(IGenericMember genericMember)
    Parameters
    Type Name Description
    IGenericMember genericMember

    The generic member to encode.

    Returns
    Type Description
    LNode

    An encoded generic member reference.

    | Edit this page View Source

    Encode(IMethod)

    Encodes a method reference.

    Declaration
    public LNode Encode(IMethod method)
    Parameters
    Type Name Description
    IMethod method

    The method reference to encode.

    Returns
    Type Description
    LNode

    An encoded method reference.

    | Edit this page View Source

    Encode(IProperty)

    Encodes a property reference.

    Declaration
    public LNode Encode(IProperty property)
    Parameters
    Type Name Description
    IProperty property

    The property reference to encode.

    Returns
    Type Description
    LNode

    An encoded property reference.

    | Edit this page View Source

    Encode(IType)

    Encodes a type reference.

    Declaration
    public LNode Encode(IType type)
    Parameters
    Type Name Description
    IType type

    The type reference to encode.

    Returns
    Type Description
    LNode

    An encoded type reference.

    | Edit this page View Source

    Encode(QualifiedName)

    Encodes a qualified name as a sequence of simple names.

    Declaration
    public LNode Encode(QualifiedName name)
    Parameters
    Type Name Description
    QualifiedName name

    A qualified name to encode. Simple names in the qualified name are encoded as such. Other names are encoded as simple names by taking their string representation.

    Returns
    Type Description
    LNode

    An encoded node.

    | Edit this page View Source

    Encode(UnqualifiedName)

    Encodes an unqualified name as a simple name.

    Declaration
    public LNode Encode(UnqualifiedName name)
    Parameters
    Type Name Description
    UnqualifiedName name

    An unqualified name to encode. Simple names are encoded as such. Other names are encoded as simple names by taking their string representation.

    Returns
    Type Description
    LNode

    An encoded node.

    | Edit this page View Source

    Encode(bool)

    Encodes a Boolean constant.

    Declaration
    public LNode Encode(bool value)
    Parameters
    Type Name Description
    bool value

    A Boolean constant to encode.

    Returns
    Type Description
    LNode

    The encoded Boolean constant.

    | Edit this page View Source

    Encode(int)

    Encodes a 32-bit signed integer constant.

    Declaration
    public LNode Encode(int value)
    Parameters
    Type Name Description
    int value

    A 32-bit signed integer constant to encode.

    Returns
    Type Description
    LNode

    The encoded 32-bit signed integer constant.

    | Edit this page View Source

    EncodeDefinition(IAssembly)

    Encodes an assembly definition.

    Declaration
    public LNode EncodeDefinition(IAssembly assembly)
    Parameters
    Type Name Description
    IAssembly assembly

    The assembly definition to encode.

    Returns
    Type Description
    LNode

    An LNode that represents the assembly definition.

    | Edit this page View Source

    EncodeDefinition(IType)

    Encodes a type definition.

    Declaration
    public LNode EncodeDefinition(IType typeDefinition)
    Parameters
    Type Name Description
    IType typeDefinition

    The type definition to encode.

    Returns
    Type Description
    LNode

    An LNode that represents the type definition.

    | Edit this page View Source

    EncodeDefinition(ITypeMember)

    Encodes a type member definition.

    Declaration
    public LNode EncodeDefinition(ITypeMember memberDefinition)
    Parameters
    Type Name Description
    ITypeMember memberDefinition

    The type member definition to encode.

    Returns
    Type Description
    LNode

    An LNode that represents the type member definition.

    | Edit this page View Source

    EncodeDefinition(Parameter)

    Encodes a parameter definition as an LNode.

    Declaration
    public LNode EncodeDefinition(Parameter parameter)
    Parameters
    Type Name Description
    Parameter parameter

    The parameter to encode.

    Returns
    Type Description
    LNode

    An encoded node.

    | Edit this page View Source

    WithCodec(IrCodec)

    Creates an encoder state that uses a particular codec but retains all other fields.

    Declaration
    public EncoderState WithCodec(IrCodec newCodec)
    Parameters
    Type Name Description
    IrCodec newCodec

    The new codec to use.

    Returns
    Type Description
    EncoderState

    An encoder state that uses newCodec.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX