TtsrManager class final
Registry + matcher for time-traveling stream rules.
Port of omp's TtsrManager: rules register with compiled regex
conditions and a stream scope; checkDelta appends a delta to its
scoped buffer and returns every rule that passes the repeat, scope, and
condition gates. Injection bookkeeping (markInjectedByNames,
restoreInjected) implements the repeat policy and session restore.
Constructors
- TtsrManager({TtsrSettings settings = TtsrSettings.defaultSettings})
-
Creates a manager with
settings(omp's defaults when omitted).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
injectedRuleNames
→ List<
String> -
Names of all injected rules (omp's persistence payload).
no setter
- messageCount → int
-
The completed-turn counter (omp's
getMessageCount).no setter -
rules
→ List<
TtsrRule> -
All registered rules, in registration order (omp's
getRules).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings → TtsrSettings
-
The active settings.
no setter
-
warnings
→ List<
String> -
Non-fatal registration problems (invalid regex, unreachable scope),
collected instead of logged (omp logs warnings; pure Dart collects).
final
Methods
-
addRule(
TtsrRule rule) → bool -
Registers
rulefor monitoring (omp'saddRule). -
checkDelta(
String delta, TtsrMatchContext context) → List< TtsrRule> -
Appends
deltato its scoped buffer and returns every matching rule (omp'scheckDelta). -
clearInjected(
) → void - Clears injected state (e.g. when the host starts a new session — omp builds a fresh manager per session).
-
hasRules(
) → bool -
Whether any rules are registered (omp's
hasRules). -
incrementMessageCount(
) → void -
Increments the completed-turn counter (omp: called on
turn_end; drives TtsrRepeatMode.afterGap). -
markInjectedByNames(
List< String> ruleNames) → void -
Marks rules as injected so they don't trigger again until the repeat
policy allows (omp's
markInjectedByNames). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resetBuffer(
) → void - Resets the stream buffers (omp: called on every turn start).
-
restoreInjected(
List< String> ruleNames) → void -
Restores injected state from persisted rule names (omp's
restoreInjected). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited