Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::ScriptInspectorPort Class Referenceabstract

The engine-thread half of a runtime inspector, as ScriptedUiSession drives it. More...

#include <script_inspector_port.hpp>

Public Types

using EvaluationDeadline = std::chrono::steady_clock::time_point

Public Member Functions

virtual ~ScriptInspectorPort ()
virtual void set_realm_capabilities (const CapabilitySet &)
 Tell the port which native capabilities the realm it is about to be attached to holds.
virtual void attach (ScriptEngine *engine)=0
 Point the port at engine, or at none with nullptr.
virtual void detach ()=0
 Release the engine; a blocked off-thread request wakes as detached.
virtual bool pump ()=0
 Run at most one queued request. True when it changed realm state.
virtual void set_post_evaluation_reset (std::function< std::string(EvaluationDeadline)> reset)=0
 Install the realm reset a completed evaluation owes.
virtual std::string run_pending_post_evaluation_reset ()=0
 Run the owed reset if one is pending.

Detailed Description

The engine-thread half of a runtime inspector, as ScriptedUiSession drives it.

The session attaches the port to its live engine across reloads, pumps it once per poll(), and discharges the realm reset a completed evaluation owes. What the port does with the engine (off-thread Runtime.evaluate, interrupt) is the implementation's business; Pulp's implementation is ScriptInspectorBridge.

Every method is called on the session's engine thread.

Member Typedef Documentation

◆ EvaluationDeadline

using pulp::view::ScriptInspectorPort::EvaluationDeadline = std::chrono::steady_clock::time_point

Constructor & Destructor Documentation

◆ ~ScriptInspectorPort()

virtual pulp::view::ScriptInspectorPort::~ScriptInspectorPort ( )
virtual

Member Function Documentation

◆ attach()

virtual void pulp::view::ScriptInspectorPort::attach ( ScriptEngine * engine)
pure virtual

Point the port at engine, or at none with nullptr.

Implemented in pulp::view::ScriptInspectorBridge.

◆ detach()

virtual void pulp::view::ScriptInspectorPort::detach ( )
pure virtual

Release the engine; a blocked off-thread request wakes as detached.

Implemented in pulp::view::ScriptInspectorBridge.

◆ pump()

virtual bool pulp::view::ScriptInspectorPort::pump ( )
pure virtual

Run at most one queued request. True when it changed realm state.

Implemented in pulp::view::ScriptInspectorBridge.

◆ run_pending_post_evaluation_reset()

virtual std::string pulp::view::ScriptInspectorPort::run_pending_post_evaluation_reset ( )
pure virtual

Run the owed reset if one is pending.

Returns its error text, empty on success or when nothing was owed.

Implemented in pulp::view::ScriptInspectorBridge.

◆ set_post_evaluation_reset()

virtual void pulp::view::ScriptInspectorPort::set_post_evaluation_reset ( std::function< std::string(EvaluationDeadline)> reset)
pure virtual

Install the realm reset a completed evaluation owes.

The session installs it once, before the first attach().

Implemented in pulp::view::ScriptInspectorBridge.

◆ set_realm_capabilities()

virtual void pulp::view::ScriptInspectorPort::set_realm_capabilities ( const CapabilitySet & )
inlinevirtual

Tell the port which native capabilities the realm it is about to be attached to holds.

The session calls this before every attach() so an evaluator can refuse a realm whose explicit grant carries an effectful capability. The default keeps a port that does not evaluate unchanged.

Reimplemented in pulp::view::ScriptInspectorBridge.


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