Class endstone::CustomChart¶
ClassList > endstone > CustomChart
Represents a custom chart.
#include <endstone/metrics/custom_chart.h>
Inherited by the following classes: endstone::AdvancedBarChart, endstone::AdvancedPie, endstone::DrilldownPie, endstone::MultiLineChart, endstone::SimpleBarChart, endstone::SimplePie, endstone::SingleLineChart
Public Functions¶
| Type | Name |
|---|---|
| CustomChart (std::string chart_id) Creates a chart with the given bStats chart id. |
|
| CustomChart (const CustomChart &) = delete |
|
| CustomChart (CustomChart &&) = delete |
|
| virtual std::optional< JsonObject > | getChartData () = 0 Gets the data for this chart. |
| const std::string & | getChartId () noexcept const Gets the id of this chart. |
| CustomChart & | operator= (const CustomChart &) = delete |
| CustomChart & | operator= (CustomChart &&) = delete |
| virtual | ~CustomChart () = default |
Public Functions Documentation¶
function CustomChart [⅓]¶
Creates a chart with the given bStats chart id.
Parameters:
chart_idthe id of the chart
Exception:
std::invalid_argumentif chart_id is empty
function CustomChart [⅔]¶
function CustomChart [3/3]¶
function getChartData¶
Gets the data for this chart.
This is called on the primary server thread. Returning no value omits the chart from the submission.
Returns:
the chart data, or no value to skip this chart
function getChartId¶
Gets the id of this chart.
Returns:
the id of this chart
function operator=¶
function operator=¶
function ~CustomChart¶
The documentation for this class was generated from the following file include/endstone/metrics/custom_chart.h