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

A type-safe display bitmask. More...

#include <display.hpp>

Public Member Functions

constexpr Display ()
 Constructs an empty display mask.
constexpr Display (uint32_t bits)
 Constructs a display mask from raw bits.
constexpr uint32_t bits () const
 Returns the raw bitmask value.
constexpr bool empty () const
 Returns whether the mask has no bits set.
constexpr bool contains (Display other) const
 Returns whether this mask fully contains all bits in other.
constexpr Displayoperator|= (Display other)
 Bitwise OR-assign.
constexpr Displayoperator&= (Display other)
 Bitwise AND-assign.
constexpr operator uint32_t () const
 Converts this display mask to raw bits.

Static Public Member Functions

static constexpr Display all ()
 Returns a mask that enables all known display surfaces.
static constexpr Display none ()
 Returns a mask that disables all display surfaces.

Static Public Attributes

static const Display ALL {ffi::DISPLAY_ALL}
 Common display masks mirroring the C ABI constants.
static const Display NONE {ffi::DISPLAY_NONE}
 Show nowhere.
static const Display DATA_WINDOW {ffi::DISPLAY_DATA_WINDOW}
 Show in data window.
static const Display PANE {ffi::DISPLAY_PANE}
 Show in pane.
static const Display PINE_SCREENER {ffi::DISPLAY_PINE_SCREENER}
 Show in Pine screener.
static const Display PRICE_SCALE {ffi::DISPLAY_PRICE_SCALE}
 Show on price scale.
static const Display STATUS_LINE {ffi::DISPLAY_STATUS_LINE}
 Show in status line.

Friends

constexpr bool operator== (Display a, Display b)
 Equality compare.
constexpr bool operator!= (Display a, Display b)
 Inequality compare.
constexpr Display operator| (Display a, Display b)
 Bitwise OR.
constexpr Display operator& (Display a, Display b)
 Bitwise AND.
constexpr Display operator~ (Display a)
 Bitwise NOT.

Detailed Description

A type-safe display bitmask.

Definition at line 25 of file display.hpp.

Constructor & Destructor Documentation

◆ Display() [1/2]

openpine::Display::Display ( )
inlineconstexpr

Constructs an empty display mask.

Definition at line 33 of file display.hpp.

Referenced by all(), contains(), none(), operator!=, operator&, operator&=(), operator==, operator|, operator|=(), and operator~.

◆ Display() [2/2]

openpine::Display::Display ( uint32_t bits)
inlineexplicitconstexpr

Constructs a display mask from raw bits.

Intended for interop with the C ABI.

Definition at line 40 of file display.hpp.

References bits().

Member Function Documentation

◆ all()

constexpr Display openpine::Display::all ( )
inlinestaticconstexpr

Returns a mask that enables all known display surfaces.

Definition at line 45 of file display.hpp.

References Display().

◆ bits()

uint32_t openpine::Display::bits ( ) const
inlineconstexpr

Returns the raw bitmask value.

Definition at line 94 of file display.hpp.

Referenced by Display().

◆ contains()

bool openpine::Display::contains ( Display other) const
inlineconstexpr

Returns whether this mask fully contains all bits in other.

Definition at line 104 of file display.hpp.

References Display().

◆ empty()

bool openpine::Display::empty ( ) const
inlineconstexpr

Returns whether the mask has no bits set.

Definition at line 99 of file display.hpp.

◆ none()

constexpr Display openpine::Display::none ( )
inlinestaticconstexpr

Returns a mask that disables all display surfaces.

Definition at line 50 of file display.hpp.

References Display().

◆ operator uint32_t()

openpine::Display::operator uint32_t ( ) const
inlineexplicitconstexpr

Converts this display mask to raw bits.

Definition at line 127 of file display.hpp.

◆ operator&=()

Display & openpine::Display::operator&= ( Display other)
inlineconstexpr

Bitwise AND-assign.

Definition at line 119 of file display.hpp.

References Display().

◆ operator|=()

Display & openpine::Display::operator|= ( Display other)
inlineconstexpr

Bitwise OR-assign.

Definition at line 111 of file display.hpp.

References Display().

◆ operator!=

bool operator!= ( Display a,
Display b )
friend

Inequality compare.

Definition at line 139 of file display.hpp.

References Display().

◆ operator&

Display operator& ( Display a,
Display b )
friend

Bitwise AND.

Definition at line 153 of file display.hpp.

References Display().

◆ operator==

bool operator== ( Display a,
Display b )
friend

Equality compare.

Definition at line 132 of file display.hpp.

References Display().

◆ operator|

Display operator| ( Display a,
Display b )
friend

Bitwise OR.

Definition at line 146 of file display.hpp.

References Display().

◆ operator~

Display operator~ ( Display a)
friend

Bitwise NOT.

Definition at line 160 of file display.hpp.

References Display().

Member Data Documentation

◆ ALL

Display openpine::Display::ALL {ffi::DISPLAY_ALL}
inlinestaticconstexpr

Common display masks mirroring the C ABI constants.

Show in all UI surfaces.

Definition at line 59 of file display.hpp.

◆ DATA_WINDOW

Display openpine::Display::DATA_WINDOW {ffi::DISPLAY_DATA_WINDOW}
inlinestaticconstexpr

Show in data window.

Definition at line 69 of file display.hpp.

◆ NONE

Display openpine::Display::NONE {ffi::DISPLAY_NONE}
inlinestaticconstexpr

Show nowhere.

Definition at line 64 of file display.hpp.

◆ PANE

Display openpine::Display::PANE {ffi::DISPLAY_PANE}
inlinestaticconstexpr

Show in pane.

Definition at line 74 of file display.hpp.

◆ PINE_SCREENER

Display openpine::Display::PINE_SCREENER {ffi::DISPLAY_PINE_SCREENER}
inlinestaticconstexpr

Show in Pine screener.

Definition at line 79 of file display.hpp.

◆ PRICE_SCALE

Display openpine::Display::PRICE_SCALE {ffi::DISPLAY_PRICE_SCALE}
inlinestaticconstexpr

Show on price scale.

Definition at line 84 of file display.hpp.

◆ STATUS_LINE

Display openpine::Display::STATUS_LINE {ffi::DISPLAY_STATUS_LINE}
inlinestaticconstexpr

Show in status line.

Definition at line 89 of file display.hpp.


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