|
static bool | formatDate (std::ostream &ostr, const std::string &key, const T &value, const std::string &format="%Y/%m/%d") |
| Recognizes and format a date. Assumes that the variable name (key ) ends with "date".
|
|
static bool | formatTime (std::ostream &ostr, const std::string &key, const T &value, const std::string &format="%H:%M") |
| Reformat a time. Assumes that the variable name (key ) ends with "time".
|
|
static bool | formatPlace (std::ostream &ostr, const std::string &key, const T &value, const std::string &format="") |
| Currently, only recognizes a place, and writes it directly in stream.
|
|
static bool | formatValue (const T &value, const std::string &format, std::ostream &ostr) |
| Given a value, print it formatted to stream.
|
|
template<class T>
class rack::VariableFormatterODIM< T >
Formats variables to output stream.
This class inherits the following formatting options from the base class:
printf() style formatting, like "%08.2d"
bash substring style formatting, like ":2:3" (take 3 letters, starting from position 2)
In addition, this class formats ODIM time stamps (what:time, what:startdate, ...)
Time formatting, like the date command
- Template Parameters
-
T | - type of the variables. |
- See also
- StringLet
-
StringMapper