Class Expression<TExpr, TTable>
Wrapper for "an expression which only lives in a certain type of table".
Inheritance
Expression<TExpr, TTable>
Implements
ICloneable<TExpr, TTable, Expression>
Inherited Members
Namespace: Mangrove.MetricSetSyntaxTree
Assembly: MetricSetSyntaxTree.dll
Syntax
public abstract class Expression<TExpr, TTable> : Expression, IVisitable<IExpressionVisitor>, ICloneable<TExpr, TTable, Expression>, ICloneable<Expression>, IDirectedAcyclicGraph<Expression> where TExpr : Expression where TTable : Table
Type Parameters
Name | Description |
---|---|
TExpr | |
TTable | The type of table this sort of expression lives in. |
Remarks
Requiring expressions to implement "clone" and "parents" operations removes much of the need for boilerplace code in visitors.
Constructors
View SourceExpression(TTable)
Declaration
public Expression(TTable table)
Parameters
Type | Name | Description |
---|---|---|
TTable | table |
Properties
View SourceTable
The table that this expression lives in.
Declaration
public TTable Table { get; }
Property Value
Type | Description |
---|---|
TTable |
Methods
View SourceClone(TTable, IReadOnlyList<Expression>)
Create a "copy" of this expression in a new table, with a new list of direct parents.
Declaration
public abstract TExpr Clone(TTable table, IReadOnlyList<Expression> parents)
Parameters
Type | Name | Description |
---|---|---|
TTable | table | |
IReadOnlyList<Expression> | parents |
Returns
Type | Description |
---|---|
TExpr |
Clone(IReadOnlyList<Expression>)
Create a "copy" of this expression in the same table, with a new list of direct parents.
Declaration
public override sealed Expression Clone(IReadOnlyList<Expression> parents)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<Expression> | parents |
Returns
Type | Description |
---|---|
Expression |