The conversion utilities of the Platinum core library include functions to convert byte orders, to format and parse numbers, and to perform checked numeric conversions.
|
| template<typename T > |
| T | beToHost (const T &value) |
| | Converts a value from big-endian to host-byteorder. More...
|
| |
|
template<typename OutIterT , typename T , typename FormatT > |
| OutIterT | formatFloat (OutIterT it, T d, const FormatT &fmt, int precision, bool fixed=false) |
| | Formats a floating point value in a given format.
|
| |
|
template<typename OutIterT , typename T > |
| OutIterT | formatFloat (OutIterT it, T d) |
| | Formats a floating point value in default format.
|
| |
|
template<typename OutIterT , typename T > |
| OutIterT | formatFloat (OutIterT it, T d, int precision, bool fixed=false) |
| | Formats a floating point value in default format.
|
| |
|
template<typename OutIterT , typename T , typename FormatT > |
| OutIterT | formatInt (OutIterT it, T i, const FormatT &fmt) |
| | Formats an integer in a given format.
|
| |
|
template<typename OutIterT , typename T > |
| OutIterT | formatInt (OutIterT it, T i) |
| | Formats an integer in a decimal format.
|
| |
|
template<typename CharT , typename T , typename FormatT > |
| CharT * | formatInt (CharT *buf, std::size_t buflen, T si, const FormatT &fmt) |
| | Formats an integer in a given format.
|
| |
| template<typename T > |
| T | hostToBe (const T &value) |
| | Converts a value from the host-byteorder to big-endian. More...
|
| |
| template<typename T > |
| T | hostToLe (const T &value) |
| | Converts a value from host-byteorder to little-endian. More...
|
| |
|
bool | isBigEndian () |
| | Returns true, if the cpu is big-endian (high-byte first).
|
| |
|
bool | isLittleEndian () |
| | Returns true, if the cpu is little-endian (low-byte first).
|
| |
| template<typename T > |
| T | leToHost (const T &value) |
| | Converts a value from little-endian to host-byteorder. More...
|
| |
|
template<typename R , typename T > |
| R | narrow (T from) |
| | Checked numeric conversion.
|
| |
|
template<typename InIterT , typename T , typename FormatT > |
| InIterT | parseFloat (InIterT it, InIterT end, T &n, const FormatT &fmt, bool &ok) |
| | Parses a floating point value in a given format.
|
| |
|
template<typename InIterT , typename T , typename FormatT > |
| InIterT | parseFloat (InIterT it, InIterT end, T &n, const FormatT &fmt) |
| | Parses a floating point value in a given format.
|
| |
|
template<typename InIterT , typename T > |
| InIterT | parseFloat (InIterT it, InIterT end, T &n, bool &ok) |
| | Parses a floating point value.
|
| |
|
template<typename InIterT , typename T > |
| InIterT | parseFloat (InIterT it, InIterT end, T &n) |
| | Parses a floating point value.
|
| |
|
template<typename InIterT , typename T , typename FormatT > |
| InIterT | parseInt (InIterT it, InIterT end, T &n, const FormatT &fmt, bool &ok) |
| | Parses an integer value in a given format.
|
| |
|
template<typename InIterT , typename T , typename FormatT > |
| InIterT | parseInt (InIterT it, InIterT end, T &n, const FormatT &fmt) |
| | Parses an integer value in a given format.
|
| |
|
template<typename InIterT , typename T > |
| InIterT | parseInt (InIterT it, InIterT end, T &n, bool &ok) |
| | Parses an integer value in decimal format.
|
| |
|
template<typename InIterT , typename T > |
| InIterT | parseInt (InIterT it, InIterT end, T &n) |
| | Parses an integer value in decimal format.
|
| |
|
template<typename InIter , typename T > |
| T | parseInt (InIter it, InIter end) |
| | Parses an integer value in decimal format.
|
| |
|
int8_t | swab (int32_t value) |
| | Swaps the byteorder of an int32_t.
|
| |
|
uint8_t | swab (uint32_t value) |
| | Swaps the byteorder of a uint32_t.
|
| |