Class ItemOperatorProvider
- Namespace
- RandomizerCore.StringItems
- Assembly
- RandomizerCore.dll
public class ItemOperatorProvider : IOperatorProvider
- Inheritance
-
ItemOperatorProvider
- Implements
- Inherited Members
Fields
AdditionAssignment
Term, Int -> Effect. Adds the provided value to the term
public const string AdditionAssignment = "+="
Field Value
Chaining
Effect, Effect -> Effect. Applies the
public const string Chaining = ">>"
Field Value
Conditional
Bool, Effect -> Effect. If the condition is met, applies the effect
public const string Conditional = "=>"
Field Value
Increment
Term -> Effect. Adds 1 to the term.
public const string Increment = "++"
Field Value
MaxAssignment
Term, Int -> Effect. Sets the term to the maximum of the provided value and its current value
public const string MaxAssignment = "=/"
Field Value
Negation
Bool -> Bool. Negates the bool
public const string Negation = "!"
Field Value
Reference
Where a bool is expected, the string is interpreted as the name of a logic def and its value is used as a bool. Where an item effect is expected, the string is interpreted as the name of an item and its effect is copied
public const string Reference = "*"
Field Value
ShortCircuitChaining
Effect, Effect -> Effect. Applies the right-hand effect if and only if the left-hand effect produces an empty item
public const string ShortCircuitChaining = ">|>"
Field Value
TermCoalescing
If the associated term does not correspond to a term in the LogicManager, any effect that would be applied to that term is ignored
public const string TermCoalescing = "?"
Field Value
Methods
GetAllOperators()
Get all operators defined by this provider.
public IReadOnlyCollection<string> GetAllOperators()
Returns
InfixBindingPower(string)
Get the left and right binding powers of the operator if that operator is a known infix operator, otherwise null
public (int, int)? InfixBindingPower(string op)
Parameters
op
string
Returns
PostfixBindingPower(string)
Get the binding power of the operator if that operator is a known postfix operator, otherwise null
public int? PostfixBindingPower(string op)
Parameters
op
string
Returns
- int?
PrefixBindingPower(string)
Get the binding power of the operator if that operator is a known prefix operator, otherwise null
public int? PrefixBindingPower(string op)
Parameters
op
string
Returns
- int?