A class used to part string specification of values with units into a single value (e.g., "2KB" -> 2048 bytes, "2Kb" -> 256 bytes) More...
#include <UnitParser.h>
Static Public Member Functions | |
static double | parse_compute_speed (std::string string) |
Given a string compute speed specification with units (e.g., "3f", "10Gf") return the size in bytes. More... | |
static double | parse_size (std::string string) |
Given a string size specification with units (e.g., "13Mb") return the size in bytes. More... | |
Detailed Description
A class used to part string specification of values with units into a single value (e.g., "2KB" -> 2048 bytes, "2Kb" -> 256 bytes)
Member Function Documentation
◆ parse_compute_speed()
|
static |
Given a string compute speed specification with units (e.g., "3f", "10Gf") return the size in bytes.
- Parameters
-
string the size specification
- Returns
- the size in bytes
- Exceptions
-
std::invalid_argument
◆ parse_size()
|
static |
Given a string size specification with units (e.g., "13Mb") return the size in bytes.
- Parameters
-
string the size specification
- Returns
- the size in bytes
- Exceptions
-
std::invalid_argument
The documentation for this class was generated from the following files:
- UnitParser.h
- UnitParser.cpp