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

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

#include <graph.hpp>

Public Member Functions

 GraphIterator (ffi::CGraphIterator *p, std::optional< ffi::GraphType > type=std::nullopt)
 Constructs an iterator from the C ABI handle.
bool next ()
 Advances to the next graph (respecting type filter if set).
int64_t id () const
 Returns the ID of the current graph.
Graph graph () const
 Returns the current graph.

Detailed Description

Iterator over non-series graphs in a chart.

Wraps the opaque iterator from the C ABI and frees it on destruction. Optionally filters by graph type.

Definition at line 148 of file graph.hpp.

Constructor & Destructor Documentation

◆ GraphIterator()

openpine::GraphIterator::GraphIterator ( ffi::CGraphIterator * p,
std::optional< ffi::GraphType > type = std::nullopt )
inline

Constructs an iterator from the C ABI handle.

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

Definition at line 161 of file graph.hpp.

Member Function Documentation

◆ graph()

Graph openpine::GraphIterator::graph ( ) const
inline

Returns the current graph.

Definition at line 183 of file graph.hpp.

◆ id()

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

Returns the ID of the current graph.

Definition at line 180 of file graph.hpp.

◆ next()

bool openpine::GraphIterator::next ( )
inline

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

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

Definition at line 169 of file graph.hpp.


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