PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pineforge::native_module::Module< Host > Class Template Referencefinal

The one class the macro instantiates: the host plus the module boundary. More...

#include <native_module.hpp>

Public Member Functions

void prepare_metrics_only_v1 (const Bar *bars, int count, const char *input_tf, const char *script_tf, bool with_timeframes) noexcept
 This is a speculative report optimization only.
 
void note_error (const char *text, const RunFailureValue &value) noexcept
 Presentation text for strategy_get_last_error, written with its run failure code (strategy_get_last_error_code) so the two never disagree.
 
void note_error (const char *text) noexcept
 The text alone, as before run-failure codes: engine_unclassified_error.
 

Detailed Description

template<typename Host>
class pineforge::native_module::Module< Host >

The one class the macro instantiates: the host plus the module boundary.

Deriving is deliberate — last_error_ is protected engine state, written here only through note_run_failure (run_failure.hpp), with its code.

Definition at line 180 of file native_module.hpp.

Member Function Documentation

◆ prepare_metrics_only_v1()

◆ note_error() [1/2]

template<typename Host>
void pineforge::native_module::Module< Host >::note_error ( const char * text,
const RunFailureValue & value )
inlinenoexcept

Presentation text for strategy_get_last_error, written with its run failure code (strategy_get_last_error_code) so the two never disagree.

Never throws: it runs on the C boundary, often from a catch handler.

Definition at line 305 of file native_module.hpp.

References pineforge::note_run_failure().

Referenced by note_error().

◆ note_error() [2/2]

template<typename Host>
void pineforge::native_module::Module< Host >::note_error ( const char * text)
inlinenoexcept

The text alone, as before run-failure codes: engine_unclassified_error.

Definition at line 312 of file native_module.hpp.

References pineforge::engine_unclassified_error, and note_error().


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