Table of Contents

Class LogicManager

Namespace
RandomizerCore.Logic
Assembly
RandomizerCore.dll
public class LogicManager
Inheritance
LogicManager
Inherited Members

Constructors

LogicManager(LogicManagerBuilder)

public LogicManager(LogicManagerBuilder source)

Parameters

source LogicManagerBuilder

Fields

ItemLookup

public readonly ReadOnlyDictionary<string, LogicItem> ItemLookup

Field Value

ReadOnlyDictionary<string, LogicItem>

LogicLookup

public readonly ReadOnlyDictionary<string, LogicDef> LogicLookup

Field Value

ReadOnlyDictionary<string, LogicDef>

StateManager

public readonly StateManager StateManager

Field Value

StateManager

Terms

public readonly TermCollection Terms

Field Value

TermCollection

TransitionLookup

public readonly ReadOnlyDictionary<string, LogicTransition> TransitionLookup

Field Value

ReadOnlyDictionary<string, LogicTransition>

Variables

public readonly ReadOnlyCollection<LogicVariable> Variables

Field Value

ReadOnlyCollection<LogicVariable>

Waypoints

public readonly ReadOnlyCollection<LogicWaypoint> Waypoints

Field Value

ReadOnlyCollection<LogicWaypoint>

intVariableOffset

public const int intVariableOffset = -100

Field Value

int

Properties

LP

public LogicProcessor LP { get; }

Property Value

LogicProcessor

VariableResolver

public VariableResolver VariableResolver { get; }

Property Value

VariableResolver

Methods

CreateDNFLogicDef(RawLogicDef)

public DNFLogicDef CreateDNFLogicDef(RawLogicDef def)

Parameters

def RawLogicDef

Returns

DNFLogicDef

CreateDNFLogicDef(string, LogicClause)

public DNFLogicDef CreateDNFLogicDef(string name, LogicClause tokens)

Parameters

name string
tokens LogicClause

Returns

DNFLogicDef

CreateRPNLogicDef(RawLogicDef)

public RPNLogicDef CreateRPNLogicDef(RawLogicDef def)

Parameters

def RawLogicDef

Returns

RPNLogicDef

CreateSingleStateLogic(RawLogicDef)

Parses infix logic which should take progression data and a single state as input.

public SingleStateLogic CreateSingleStateLogic(RawLogicDef def)

Parameters

def RawLogicDef

Returns

SingleStateLogic

CreateSingleStateLogic(string, LogicClause)

public SingleStateLogic CreateSingleStateLogic(string name, LogicClause c)

Parameters

name string
c LogicClause

Returns

SingleStateLogic

FromItemString(string, string)

public LogicItem FromItemString(string name, string itemDef)

Parameters

name string
itemDef string

Returns

LogicItem

FromString(RawLogicDef)

public LogicDef FromString(RawLogicDef def)

Parameters

def RawLogicDef

Returns

LogicDef

FromTokens(string, LogicClause)

[Obsolete]
public RPNLogicDef FromTokens(string name, LogicClause c)

Parameters

name string
c LogicClause

Returns

RPNLogicDef

GetItem(string)

Fetches the logic item by name. Returns null if not defined.

public LogicItem? GetItem(string name)

Parameters

name string

Returns

LogicItem

GetItemStrict(string)

Fetches the logic item by name.

public LogicItem GetItemStrict(string name)

Parameters

name string

Returns

LogicItem

Exceptions

ArgumentException

The logic item is not defined.

GetLogicDef(string)

Fetches the logic def by name. Returns null if not defined.

public LogicDef? GetLogicDef(string name)

Parameters

name string

Returns

LogicDef

GetLogicDefStrict(string)

Fetches the logic def by name.

public LogicDef GetLogicDefStrict(string name)

Parameters

name string

Returns

LogicDef

Exceptions

ArgumentException

The logic def is not defined.

GetTerm(int)

Fetches the term by its id.

public Term GetTerm(int id)

Parameters

id int

Returns

Term

GetTerm(string)

Fetches the term by name. Returns null if not defined.

public Term? GetTerm(string item)

Parameters

item string

Returns

Term

GetTermStrict(string)

Fetches the term by name.

public Term GetTermStrict(string item)

Parameters

item string

Returns

Term

Exceptions

ArgumentException

The tern is not defined.

GetTransition(string)

Fetches the logic transition by name. Returns null if not defined.

public LogicTransition? GetTransition(string name)

Parameters

name string

Returns

LogicTransition

GetTransitionStrict(string)

Fetches the logic transition by name.

public LogicTransition GetTransitionStrict(string name)

Parameters

name string

Returns

LogicTransition

Exceptions

ArgumentException

The logic transition is not defined.

GetVariable(int)

Fetches the variable by its id.

public LogicVariable GetVariable(int id)

Parameters

id int

Returns

LogicVariable

GetVariable(string)

Fetches the variable by name. If the variable has not yet been instantiated, caches it and gives it an id. Returns null if the name cannot be resolved to a variable.

public LogicVariable? GetVariable(string name)

Parameters

name string

Returns

LogicVariable

GetVariableStrict(string)

Fetches the variable by name. If the variable has not yet been instantiated, caches it and gives it an id.

public LogicVariable GetVariableStrict(string name)

Parameters

name string

Returns

LogicVariable

Exceptions

ArgumentException

The name cannot be resolved to a variable.

IsTermOrVariable(string)

public bool IsTermOrVariable(string name)

Parameters

name string

Returns

bool