Class LogicDef
- Namespace
- RandomizerCore.Logic
- Assembly
- RandomizerCore.dll
Class representing a logic clause, which can be evaluated with a ProgressionManager.
public abstract class LogicDef : ILogicDef
- Inheritance
-
LogicDef
- Implements
- Derived
- Inherited Members
Constructors
LogicDef(string, string)
public LogicDef(string name, string infixSource)
Parameters
Properties
InfixSource
The string logic from which the LogicDef was constructed.
public string InfixSource { get; }
Property Value
Name
An identifier for the LogicDef. May not be unique.
public string Name { get; }
Property Value
Methods
CanGet(ProgressionManager)
Evaluates the logic, for the given progression data input.
public abstract bool CanGet(ProgressionManager pm)
Parameters
Returns
GetTerms()
The sequence of terms on which the LogicDef depends. Terms not included in the sequence must not affect the value of CanGet.
public abstract IEnumerable<Term> GetTerms()
Returns
ToInfix()
The string representation of the LogicDef. Must be logically equivalent to InfixSource, but generally does not contain macros and may be expanded or simplified in other ways.
public virtual string ToInfix()
Returns
ToLogicClause()
Creates a LogicClause equivalent to the LogicDef using ToTokenSequence().
public LogicClause ToLogicClause()
Returns
ToLogicClauseBuilder()
Creates a LogicClauseBuilder equivalent to the LogicDef using ToTokenSequence().
public LogicClauseBuilder ToLogicClauseBuilder()
Returns
ToString()
public override string ToString()
Returns
ToTokenSequence()
Converts the LogicDef to its equivalent sequence of LogicTokens in RPN format.
public abstract IEnumerable<LogicToken> ToTokenSequence()