blob: 359e2975f461ce382e514a023ae44519e62efc1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#pragma once
#include <ostream>
#include <string>
struct FormatNumericalData
{
//! string to be printed before the data
std::string prefix;
//! string to be printed after the data
std::string suffix;
//! gives the minimum number of digits to appear (after the radix if
//! scientific_notation is enabled)
int precision = -1;
//! define if scientific notation is enabled
bool scientific_notation = false;
//! define if a sign + should be placed before a number
bool display_plus = false;
//! format the given stream according to class attributes
std::ostream& formatOs(std::ostream& os) const;
};
|