PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pineforge::native_bar_views_v1::NativeBarViews Struct Reference

Explicit read context (RESOLVED V1, required changes 1-4). More...

#include <native_bar_views.hpp>

Data Fields

const NativeInstrumentFeedView *const * instrument_feeds = nullptr
 
std::size_t instrument_feed_count = 0
 
const NativeLowerPathSource * lower_path = nullptr
 
NativeBarView lower_segment {nullptr, 0}
 

Detailed Description

Explicit read context (RESOLVED V1, required changes 1-4).

Zero feed count means owned vectors for every feed; the table pointer is then ignored. Otherwise the nonnull table count equals the spec's metadata count, and slot i binds entry i. Null slot: use owned vectors. Nonnull slot: present borrowed data, including {{nullptr,0},nullptr} for an installed empty feed; it never falls back to owned data. No metadata entry means absent. Metadata/columns stay in NativeInstrumentFeed, with empty owning bar/close vectors for a borrowed slot. Mixed owned/borrowed slots are allowed. Nonempty borrowed arrays are nonnull, immutable, and have bars.size rows.

Consumer staging copies descriptors and the table, not the arrays. Caller descriptors/table may die after staging; arrays live through every use of the accepted binding, through the public run exit. Installed-feed owners also keep arrays alive until replacement, clearing or strategy_free. The active query exposes no pending slot. Context pointers are borrowed until replacement/detachment/destruction; the segment is empty until the kernel selects one. The const source prevents readers selecting a segment.

At every public run exit, including abort/error, detach tables/source and segment, releasing borrowed pointers after retaining scalar counts/content digests for identity. A detached Ready binding is never admitted: that is engine_invariant. A lower-path source bound at stream_begin is likewise engine_invariant. Staging/query are private consumer members, not functions taking a public host (required changes 1-2).

Definition at line 73 of file native_bar_views.hpp.

Field Documentation

◆ instrument_feeds

const NativeInstrumentFeedView* const* pineforge::native_bar_views_v1::NativeBarViews::instrument_feeds = nullptr

Definition at line 74 of file native_bar_views.hpp.

◆ instrument_feed_count

std::size_t pineforge::native_bar_views_v1::NativeBarViews::instrument_feed_count = 0

Definition at line 75 of file native_bar_views.hpp.

◆ lower_path

const NativeLowerPathSource* pineforge::native_bar_views_v1::NativeBarViews::lower_path = nullptr

Definition at line 76 of file native_bar_views.hpp.

◆ lower_segment

NativeBarView pineforge::native_bar_views_v1::NativeBarViews::lower_segment {nullptr, 0}

Definition at line 77 of file native_bar_views.hpp.


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