Show / Hide Table of Contents

    Class TypeVisitor

    A type of object that recursively applies a mapping to types.

    Inheritance
    System.Object
    TypeVisitor
    TypeFuncVisitor
    TypeMappingVisitor
    Inherited Members
    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.TypeSystem
    Assembly: Flame.dll
    Syntax
    public abstract class TypeVisitor

    Methods

    | Improve this Doc View Source

    IsOfInterest(IType)

    Tells if a type is of interest to this visitor. Visitors always specify custom behavior for interesting types, whereas uninteresting composite types are usually treated the same: the visitor simply visits the types they are composed of.

    Declaration
    protected abstract bool IsOfInterest(IType type)
    Parameters
    Type Name Description
    IType type

    A type.

    Returns
    Type Description
    System.Boolean

    true if the type is interesting; otherwise, false.

    | Improve this Doc View Source

    Visit(IField)

    Visits a particular field's recursive generic arguments and creates a new specialization based on the results.

    Declaration
    public IField Visit(IField field)
    Parameters
    Type Name Description
    IField field

    The field to visit.

    Returns
    Type Description
    IField

    A visited field.

    | Improve this Doc View Source

    Visit(IMethod)

    Visits a particular method's recursive generic arguments and creates a new specialization based on the results.

    Declaration
    public IMethod Visit(IMethod method)
    Parameters
    Type Name Description
    IMethod method

    The method to visit.

    Returns
    Type Description
    IMethod

    A visited method.

    | Improve this Doc View Source

    Visit(IType)

    Visits a type.

    Declaration
    public IType Visit(IType type)
    Parameters
    Type Name Description
    IType type

    A type to visit.

    Returns
    Type Description
    IType

    A visited type.

    | Improve this Doc View Source

    Visit(Parameter)

    Visits a parameter's type and uses the result to create a new parameter.

    Declaration
    public Parameter Visit(Parameter parameter)
    Parameters
    Type Name Description
    Parameter parameter

    The parameter to visit.

    Returns
    Type Description
    Parameter

    A visited parameter.

    | Improve this Doc View Source

    VisitAll(IReadOnlyList<IMethod>)

    Visits all methods in a list of methods.

    Declaration
    public IReadOnlyList<IMethod> VisitAll(IReadOnlyList<IMethod> methods)
    Parameters
    Type Name Description
    System.Collections.Generic.IReadOnlyList<IMethod> methods

    A list of methods to visit.

    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<IMethod>

    A list of visited methods.

    | Improve this Doc View Source

    VisitAll(IReadOnlyList<IType>)

    Visits all types in a list of types.

    Declaration
    public IReadOnlyList<IType> VisitAll(IReadOnlyList<IType> types)
    Parameters
    Type Name Description
    System.Collections.Generic.IReadOnlyList<IType> types

    A list of types to visit.

    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<IType>

    A list of visited types.

    | Improve this Doc View Source

    VisitAll(IReadOnlyList<Parameter>)

    Visits all parameters in a list of parameters.

    Declaration
    public IReadOnlyList<Parameter> VisitAll(IReadOnlyList<Parameter> parameters)
    Parameters
    Type Name Description
    System.Collections.Generic.IReadOnlyList<Parameter> parameters

    A list of parameters to visit.

    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<Parameter>

    A list of visited parameters.

    | Improve this Doc View Source

    VisitInteresting(IType)

    Visits a type that has been marked as interesting.

    Declaration
    protected abstract IType VisitInteresting(IType type)
    Parameters
    Type Name Description
    IType type

    A type to visit.

    Returns
    Type Description
    IType

    A visited type.

    | Improve this Doc View Source

    VisitUninteresting(IType)

    Visits a type that has not been marked as interesting.

    Declaration
    protected virtual IType VisitUninteresting(IType type)
    Parameters
    Type Name Description
    IType type

    A type to visit.

    Returns
    Type Description
    IType

    A visited type.

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