ComponentHandler class abstract

Engine component (phase 2) cắm vào ShareMapEngine qua ShareMapEngine.registerComponentHandler.

Implementers

Constructors

ComponentHandler()

Properties

componentTypes → Set<String>
Loại component dựng được — vào capabilities.components (§3.1). Phần tử items[] có type ngoài tập này → handler trả COMMAND_NOT_ALLOWED.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasTransitions → bool
Đang có transition (route tiến độ…) — engine không chờ idle, chụp mapContext với settled: false.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
themeCapability → Map<String, dynamic>?
capabilities.theme (sharemap-amjson-theme.md mục 6) — theme component handler đang dùng: {name, version, presets}. null = không khai.
no setter

Methods

apply(List<ComponentActionRef> segment, BatchOrigin origin) → Future<List<ComponentOutcome>>
Pha B: áp một đoạn action component liên tiếp đã qua Pha A — một lần ghi source cho cả đoạn (components doc 10.10). Trả đúng một ComponentOutcome cho mỗi phần tử của segment, cùng thứ tự.
attach(ComponentHost host) → void
Gọi một lần khi đăng ký.
clear(BatchOrigin origin) → Future<int>
ai.clearContent của origin: gỡ mọi component thuộc namespace đó (phát removed với reason: "clear"). Trả số component đã gỡ.
dispose() → void
handleStyleReloaded() → void
Style vừa nạp lại — mọi source/layer/ảnh sm-* đã mất.
hasComponent(String id) → bool
Id đang thuộc một component — source.addOrUpdate không được dùng lại (4.4 "một id, một tài nguyên").
inventory() → ComponentInventory
Nhóm mapContext.component (L1) — label, không toạ độ.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
precheck(List<ComponentActionRef> actions, BatchOrigin origin) → Future<List<ComponentActionError>>
Pha A (components doc 10.1 ②): kiểm mọi action component.* của batch trên bản nháp sổ, theo thứ tự, trước khi engine chạm bản đồ. Trả rỗng = hợp lệ. Một lỗi bất kỳ ⇒ cả batch rejected.
showTemplatePopup(TemplatePopupRequest request) → bool
Popup mẫu của layer / marker hàng loạt khi app không tự vẽ (onTemplatePopup bỏ trống). true = handler đã hiện nó.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited