OpenPine C++ API
C++ wrapper for the OpenPine Pine Script VM
Loading...
Searching...
No Matches
line_fill.hpp
Go to the documentation of this file.
1
#pragma once
2
7
8
#if (defined(_MSVC_LANG) ? _MSVC_LANG : __cplusplus) < 201703L
9
#error \
10
"OpenPine C++ wrapper headers require C++17 (std::optional, std::string_view)."
11
#endif
12
13
#include <cstdint>
14
#include <optional>
15
16
#include "
../ffi.hpp
"
17
18
namespace
openpine
{
19
namespace
graph
{
20
24
class
LineFill
{
25
private
:
26
const
ffi::LineFill* p_;
27
28
public
:
29
LineFill
(
const
ffi::LineFill* p) : p_(p) {}
30
34
int64_t
line1Id
()
const
{
return
ffi::lineFillLine1Id(p_); }
35
39
int64_t
line2Id
()
const
{
return
ffi::lineFillLine2Id(p_); }
40
44
std::optional<uint32_t>
color
()
const
{
45
uint32_t v;
46
if
(ffi::lineFillColor(p_, &v)) {
47
return
v;
48
}
else
{
49
return
std::nullopt;
50
}
51
}
52
};
53
54
}
// namespace graph
55
}
// namespace openpine
openpine::graph::LineFill::line2Id
int64_t line2Id() const
Gets the second line graph id.
Definition
line_fill.hpp:39
openpine::graph::LineFill::line1Id
int64_t line1Id() const
Gets the first line graph id.
Definition
line_fill.hpp:34
openpine::graph::LineFill::LineFill
LineFill(const ffi::LineFill *p)
Definition
line_fill.hpp:29
openpine::graph::LineFill::color
std::optional< uint32_t > color() const
Gets the optional fill color.
Definition
line_fill.hpp:44
ffi.hpp
openpine::graph
Definition
box.hpp:22
openpine
Definition
chart.hpp:28
cpp
include
visuals
line_fill.hpp
Generated by
1.16.1