RoomInputs class final
The trace inputs of a whole document, for the Room and Separator tools and the separator grips (spec 10 D4, D19-D21; Ruling 10-11): the document adapter. The shell owns one instance and hands it to all three.
It holds every live wall and separator (the engine's object rule,
asked through live_objects.dart), each wall's wall
neighbours by the engine's own predicate over WallType().reach, each
input and place box, and bounds. The inputs are those the view adapter
gives, bit for bit (RI1).
Marked stale on each of the document's changes (its changes stream,
which delivers after the task that made the change) and on invalidate,
and rebuilt at the next query.
It is the tools' PlaceSource (spec 10 D7, D19): traceRoomAmong(seed, roomInputs) traces what a room there would.
- Implemented types
Constructors
- RoomInputs(DraftDocument document)
Properties
- bounds → Aabb2?
-
U(spec 10 D7): the bounding box of every place box, all of them finite. Null when nothing is placed.no setteroverride - debugRebuilds ↔ int
-
How many times the cache was rebuilt. Never reset.
getter/setter pair
- document → DraftDocument
-
final
- generation → int
-
Bumped whenever the cache goes stale: on each of the document's
changes and on invalidate. A tool that caches something derived from
the inputs (a traced preview) compares it with the value it built at.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Cancels the document subscription. The owner calls it once.
-
inputOf(
Handle h) → RoomInput? -
h's input, or null whenhis not a live wall or separator or is degenerate.override -
invalidate(
) → void -
The next query rebuilds the cache. The document's
changesstream delivers only after the task that made a change, so whatever reads the cache in the task of an edit calls this first: it must never read an input the document no longer has. The Room tool calls it at its click and again right after itsexecute; the Separator tool at its second click, before the trim, and again right after itsexecute; the separator grips at release, before they trim, since they never execute (the select tool executes the command they return). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
placeBoxOf(
Handle h) → Aabb2? -
h's place box: its input's box, or null. -
placedIn(
Aabb2 box) → List< Handle> -
The live walls and separators, ascending, whose place box touches
box(closed: touching counts), asParametricView.placedInanswers.override -
toString(
) → String -
A string representation of this object.
inherited
-
wallNeighboursOf(
Handle h) → List< Handle> -
Live wall
h's wall neighbours, ascending, asParametricView .neighbourslists the walls among them; empty for any other handle.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited