Struct EntityChangeScope

Struct Documentation

struct EntityChangeScope

Scope hint passed to PluginContext::notify_entities_changed.

Identifies which part of the entity tree a plugin has just mutated so the gateway can limit the reload / rediscovery work. All fields are optional; when every field is empty the gateway performs a full-surface refresh.

The scope is a HINT. The gateway is free to do more work than requested if the implementation is simpler that way - the only guarantee to the plugin is “by the time this returns, the tree reflects my changes”.

Public Functions

inline bool is_full_refresh() const noexcept

Convenience predicate. Equivalent to “no hint - refresh everything”.

Public Members

std::optional<std::string> area_id

Area identifier whose contents changed. When set, the gateway reloads this area’s subtree (components / apps / functions underneath it).

std::optional<std::string> component_id

Component identifier whose apps / subcomponents changed. May be set without area_id when the plugin does not know or care which area owns the component.

Public Static Functions

static inline EntityChangeScope full_refresh() noexcept

Produce a full_refresh() sentinel scope. Sugar for callers that want to be explicit at the call site.

static inline EntityChangeScope for_component(std::string id)

Scope to a single component id.

static inline EntityChangeScope for_area(std::string id)

Scope to a single area id.