Formats the lines Trawl/ValuesDisplay shows on the HUD, one per signal.
More...
#include <ValuesDisplayBase.h>
- Author
- Karl-Johan Reite
Plain C++ with no Ogre dependency, so it is built and unit-tested in every configuration.
- Revision history:
- 20.11.2013 KJR: Initial version. 26.09.2026: Formatting only; the text is drawn by fhsim::Hud (fhsim 3.3.0).
◆ ValuesDisplayBase()
| ValuesDisplayBase::ValuesDisplayBase |
( |
std::vector< DisplayValue > |
valueSpec | ) |
|
|
explicit |
Stores how each signal is formatted.
- Parameters
-
| valueSpec | One entry per signal, in display order. |
◆ FormatLines()
| std::vector< std::string > ValuesDisplayBase::FormatLines |
( |
const double *const |
vals | ) |
const |
Formats one line per signal: "description value unit".
The value part is the signal's fmt format applied to its elements, each multiplied by the signal's multiplier; the unit and its leading space are left out when the unit is empty. Throws fmt::format_error when a format does not match its signal.
- Parameters
-
| vals | All signal elements, concatenated in signal order. |
- Returns
- One line per signal, in the order given to the constructor.
◆ NumLines()
| std::size_t ValuesDisplayBase::NumLines |
( |
| ) |
const |
|
inline |
Tells how many lines FormatLines() returns.
- Returns
- The number of signals.
The documentation for this class was generated from the following file: