|
OpenPine C++ API
C++ wrapper for the OpenPine Pine Script VM
|
RAII wrapper around a ffi::CandlestickStream. More...
#include <instance.hpp>
Public Member Functions | |
| CandlestickStream (std::string_view symbol, std::string_view timeframe, int64_t from_time) | |
| Creates a new stream. | |
| ~CandlestickStream () | |
| CandlestickStream (const CandlestickStream &)=delete | |
| CandlestickStream & | operator= (const CandlestickStream &)=delete |
| void | push (const CandlestickItem &item) |
| Pushes one bar into the stream (thread-safe). | |
| void | finish () |
| Signals end-of-stream (thread-safe). Idempotent. | |
| ffi::CandlestickStream * | release () |
| Returns the underlying raw handle and releases ownership. | |
| ffi::CandlestickStream * | handle () const |
| Returns the raw handle without releasing ownership. | |
RAII wrapper around a ffi::CandlestickStream.
Create one inside DataProvider::candlesticksOpen, push bars via push(), and call finish() (or let the destructor do it) when all data has been queued. The stream may be pushed from any thread.
Definition at line 57 of file instance.hpp.
|
inline |
Creates a new stream.
Pass the same arguments received from DataProvider::candlesticksOpen.
Definition at line 64 of file instance.hpp.
Referenced by CandlestickStream(), and operator=().
|
inline |
Definition at line 71 of file instance.hpp.
References finish().
|
delete |
References CandlestickStream().
|
inline |
Signals end-of-stream (thread-safe). Idempotent.
Definition at line 88 of file instance.hpp.
Referenced by ~CandlestickStream().
|
inline |
Returns the raw handle without releasing ownership.
Definition at line 112 of file instance.hpp.
|
delete |
References CandlestickStream().
|
inline |
Pushes one bar into the stream (thread-safe).
Definition at line 79 of file instance.hpp.
|
inline |
Returns the underlying raw handle and releases ownership.
Call this to hand the stream over to the VM (i.e. as the return value of candlesticksOpen). After this call the CandlestickStream object must not be used for pushing — but it is still safe to call finish() via the raw pointer through candlestickStreamFinish.
Definition at line 105 of file instance.hpp.