| 24 | }; |
| 25 | |
| 26 | class threshold |
| 27 | { |
| 28 | public: |
| 29 | // doubles are always enough for ANY 64 bit value |
| 30 | double lower; |
| 31 | double upper; |
| 32 | // true means everything BELOW upper/outside [lower-upper] is fine |
| 33 | bool legal; |
| 34 | bool perc; |
| 35 | bool set; |
| 36 | |
| 37 | threshold(); |
| 38 | |
| 39 | threshold(const double v, const double c, bool l = true, bool p = false); |
| 40 | |
| 41 | threshold(const std::wstring&); |
| 42 | |
| 43 | // returns true if the threshold is broken |
| 44 | bool rend(const double val, const double max = 100.0); |
| 45 | |
| 46 | // returns a printable string of the threshold |
| 47 | std::wstring pString(const double max = 100.0); |
| 48 | |
| 49 | threshold toSeconds(const Tunit& fromUnit); |
| 50 | }; |
| 51 | |
| 52 | std::wstring removeZero(double); |
| 53 | std::vector<std::wstring> splitMultiOptions(const std::wstring&); |
no outgoing calls
no test coverage detected