Class TypeFuncVisitor
A type visitor that uses a type-to-type mapping function under the hood.
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 sealed class TypeFuncVisitor : TypeVisitor
Constructors
| Improve this Doc View SourceTypeFuncVisitor(Func<IType, IType>)
Creates a type visitor based on a type-to-type mapping function.
Declaration
public TypeFuncVisitor(Func<IType, IType> mapType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<IType, IType> | mapType | A type-to-type mapping function. |
Properties
| Improve this Doc View SourceMapType
Gets the type-to-type mapping this visitor uses under the hood.
Declaration
public Func<IType, IType> MapType { get; }
Property Value
| Type | Description |
|---|---|
| System.Func<IType, IType> | A type-to-type mapping. |
Methods
| Improve this Doc View SourceIsOfInterest(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 override bool IsOfInterest(IType type)
Parameters
| Type | Name | Description |
|---|---|---|
| IType | type | A type. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Overrides
| Improve this Doc View SourceVisitInteresting(IType)
Visits a type that has been marked as interesting.
Declaration
protected override IType VisitInteresting(IType type)
Parameters
| Type | Name | Description |
|---|---|---|
| IType | type | A type to visit. |
Returns
| Type | Description |
|---|---|
| IType | A visited type. |