Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::LockResult Struct Reference

Result of locking one tweak into a generated source string. More...

#include <lock_to_source.hpp>

Public Member Functions

bool mutated () const
 True when the lock changed the source text.
bool ok () const
 True when the anchor was located, regardless of whether a rewrite was needed (already_current counts as success — the source already carries the value).

Public Attributes

LockStatus status = LockStatus::anchor_not_found
std::string source
 The (possibly rewritten) source text.
std::string style_property
 The CSS-style property name the path resolved to (camelCase, e.g.
std::string message
 Human-readable summary, suitable for CLI / inspector display.
int line = 0
 1-based line number of the rewritten / inserted assignment, or 0 when nothing was located.

Detailed Description

Result of locking one tweak into a generated source string.

Member Function Documentation

◆ mutated()

bool pulp::view::LockResult::mutated ( ) const
inline

True when the lock changed the source text.

◆ ok()

bool pulp::view::LockResult::ok ( ) const
inline

True when the anchor was located, regardless of whether a rewrite was needed (already_current counts as success — the source already carries the value).

Member Data Documentation

◆ line

int pulp::view::LockResult::line = 0

1-based line number of the rewritten / inserted assignment, or 0 when nothing was located.

Useful for a "jump to source" affordance.

◆ message

std::string pulp::view::LockResult::message

Human-readable summary, suitable for CLI / inspector display.

◆ source

std::string pulp::view::LockResult::source

The (possibly rewritten) source text.

On a non-mutating status (already_current, anchor_not_found, unsupported_property) this equals the input verbatim.

◆ status

LockStatus pulp::view::LockResult::status = LockStatus::anchor_not_found

◆ style_property

std::string pulp::view::LockResult::style_property

The CSS-style property name the path resolved to (camelCase, e.g.

"backgroundColor"). Empty for unsupported_property.


The documentation for this struct was generated from the following file: