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

Wrapper for an integer script input. More...

#include <input_int.hpp>

Public Member Functions

 InputInt (const ffi::InputInt &data, const ffi::Input *input=nullptr)
 Constructs from FFI data and optional handle for optionAt().
int64_t id () const
 Input ID.
int64_t defaultValue () const
 Default value.
std::optional< std::string_view > title () const
 Optional title.
std::optional< std::string_view > tooltip () const
 Optional tooltip.
std::optional< std::string_view > inlineGroup () const
 Optional inline group name.
std::optional< std::string_view > group () const
 Optional group name.
uint64_t display () const
 Display bitmask.
bool active () const
 Whether the input is active.
uintptr_t optionsLength () const
 Number of options (for optionAt()).
std::optional< int64_t > minValue () const
 Optional minimum value.
std::optional< int64_t > maxValue () const
 Optional maximum value.
std::optional< int64_t > step () const
 Optional step.
bool confirm () const
 Whether the input requires confirmation.
std::optional< int64_t > optionAt (uintptr_t index) const
 Option value at the given index.

Friends

class openpine::ScriptInput

Detailed Description

Wrapper for an integer script input.

String views are valid only while the ScriptInfo/Instance is alive.

Definition at line 27 of file input_int.hpp.

Constructor & Destructor Documentation

◆ InputInt()

openpine::inputs::InputInt::InputInt ( const ffi::InputInt & data,
const ffi::Input * input = nullptr )
inline

Constructs from FFI data and optional handle for optionAt().

Definition at line 30 of file input_int.hpp.

Member Function Documentation

◆ active()

bool openpine::inputs::InputInt::active ( ) const
inline

Whether the input is active.

Definition at line 55 of file input_int.hpp.

◆ confirm()

bool openpine::inputs::InputInt::confirm ( ) const
inline

Whether the input requires confirmation.

Definition at line 71 of file input_int.hpp.

◆ defaultValue()

int64_t openpine::inputs::InputInt::defaultValue ( ) const
inline

Default value.

Definition at line 35 of file input_int.hpp.

◆ display()

uint64_t openpine::inputs::InputInt::display ( ) const
inline

Display bitmask.

Definition at line 53 of file input_int.hpp.

◆ group()

std::optional< std::string_view > openpine::inputs::InputInt::group ( ) const
inline

Optional group name.

Definition at line 49 of file input_int.hpp.

References openpine::detail::optRefToView().

◆ id()

int64_t openpine::inputs::InputInt::id ( ) const
inline

Input ID.

Definition at line 33 of file input_int.hpp.

◆ inlineGroup()

std::optional< std::string_view > openpine::inputs::InputInt::inlineGroup ( ) const
inline

Optional inline group name.

Definition at line 45 of file input_int.hpp.

References openpine::detail::optRefToView().

◆ maxValue()

std::optional< int64_t > openpine::inputs::InputInt::maxValue ( ) const
inline

Optional maximum value.

Definition at line 63 of file input_int.hpp.

◆ minValue()

std::optional< int64_t > openpine::inputs::InputInt::minValue ( ) const
inline

Optional minimum value.

Definition at line 59 of file input_int.hpp.

◆ optionAt()

std::optional< int64_t > openpine::inputs::InputInt::optionAt ( uintptr_t index) const
inline

Option value at the given index.

Parameters
indexZero-based option index (must be < optionsLength()).
Returns
The option value, or std::nullopt if out of range or not available.

Definition at line 78 of file input_int.hpp.

◆ optionsLength()

uintptr_t openpine::inputs::InputInt::optionsLength ( ) const
inline

Number of options (for optionAt()).

Definition at line 57 of file input_int.hpp.

◆ step()

std::optional< int64_t > openpine::inputs::InputInt::step ( ) const
inline

Optional step.

Definition at line 67 of file input_int.hpp.

◆ title()

std::optional< std::string_view > openpine::inputs::InputInt::title ( ) const
inline

Optional title.

Definition at line 37 of file input_int.hpp.

References openpine::detail::optRefToView().

◆ tooltip()

std::optional< std::string_view > openpine::inputs::InputInt::tooltip ( ) const
inline

Optional tooltip.

Definition at line 41 of file input_int.hpp.

References openpine::detail::optRefToView().

◆ openpine::ScriptInput

friend class openpine::ScriptInput
friend

Definition at line 88 of file input_int.hpp.


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