OpenPine C++ API
C++ wrapper for the OpenPine Pine Script VM
Loading...
Searching...
No Matches
openpine::SeriesGraphIterator Class Reference

Iterator over series graphs in a chart. More...

#include <series_graph.hpp>

Public Member Functions

 SeriesGraphIterator (ffi::CSeriesGraphIterator *p, std::optional< ffi::SeriesGraphType > type=std::nullopt)
 Constructs an iterator from the C ABI handle.
bool next ()
 Advances the iterator to the next series graph (respecting type filter if set).
int64_t id () const
 Gets the ID of the current series graph.
SeriesGraph seriesGraph () const
 Gets the current series graph.

Detailed Description

Iterator over series graphs in a chart.

Wraps the opaque iterator returned from the C ABI and deletes it automatically. Optionally filters by series graph type.

Definition at line 170 of file series_graph.hpp.

Constructor & Destructor Documentation

◆ SeriesGraphIterator()

openpine::SeriesGraphIterator::SeriesGraphIterator ( ffi::CSeriesGraphIterator * p,
std::optional< ffi::SeriesGraphType > type = std::nullopt )
inline

Constructs an iterator from the C ABI handle.

Parameters
pOpaque iterator from the C ABI.
typeIf set, only series graphs of this type are yielded.

Definition at line 185 of file series_graph.hpp.

Member Function Documentation

◆ id()

int64_t openpine::SeriesGraphIterator::id ( ) const
inline

Gets the ID of the current series graph.

Definition at line 207 of file series_graph.hpp.

◆ next()

bool openpine::SeriesGraphIterator::next ( )
inline

Advances the iterator to the next series graph (respecting type filter if set).

Returns
true if there is a next series graph, false otherwise.

Definition at line 194 of file series_graph.hpp.

◆ seriesGraph()

SeriesGraph openpine::SeriesGraphIterator::seriesGraph ( ) const
inline

Gets the current series graph.

Definition at line 212 of file series_graph.hpp.


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