12#if (defined(_MSVC_LANG) ? _MSVC_LANG : __cplusplus) < 201703L
13#error "OpenPine C++ wrapper headers require C++17."
94 constexpr uint32_t
bits()
const {
return bits_; }
99 constexpr bool empty()
const {
return bits_ == 0; }
105 return (bits_ & other.bits_) == other.bits_;
112 bits_ |= other.bits_;
120 bits_ &= other.bits_;
127 explicit constexpr operator uint32_t()
const {
return bits_; }
133 return a.bits_ == b.bits_;
140 return a.bits_ != b.bits_;
147 return Display(a.bits_ | b.bits_);
154 return Display(a.bits_ & b.bits_);
A type-safe display bitmask.
static const Display ALL
Common display masks mirroring the C ABI constants.
friend constexpr Display operator~(Display a)
Bitwise NOT.
static const Display NONE
Show nowhere.
static const Display PINE_SCREENER
Show in Pine screener.
friend constexpr Display operator&(Display a, Display b)
Bitwise AND.
static constexpr Display all()
Returns a mask that enables all known display surfaces.
constexpr Display()
Constructs an empty display mask.
static const Display STATUS_LINE
Show in status line.
constexpr Display & operator&=(Display other)
Bitwise AND-assign.
static const Display PANE
Show in pane.
static const Display DATA_WINDOW
Show in data window.
static constexpr Display none()
Returns a mask that disables all display surfaces.
friend constexpr bool operator!=(Display a, Display b)
Inequality compare.
static const Display PRICE_SCALE
Show on price scale.
constexpr uint32_t bits() const
Returns the raw bitmask value.
constexpr bool empty() const
Returns whether the mask has no bits set.
friend constexpr Display operator|(Display a, Display b)
Bitwise OR.
constexpr Display & operator|=(Display other)
Bitwise OR-assign.
friend constexpr bool operator==(Display a, Display b)
Equality compare.
constexpr Display(uint32_t bits)
Constructs a display mask from raw bits.
constexpr bool contains(Display other) const
Returns whether this mask fully contains all bits in other.