![]() |
Open Lighting Architecture 0.10.9
|
Formatting functions for basic types.
Go to the source code of this file.
Namespaces | |
namespace | ola |
The namespace containing all OLA symbols. | |
Functions | |
string | ola::strings::IntToString (int i) |
Convert an int to a string. | |
string | ola::strings::IntToString (unsigned int i) |
Convert an unsigned int to a string. | |
template<typename T > | |
_ToHex< T > | ola::strings::ToHex (T v, bool prefix=true) |
Convert a value to a hex string. | |
template<typename T > | |
std::ostream & | ola::strings::operator<< (std::ostream &out, const ola::strings::_ToHex< T > &i) |
Output the _ToHex type to an ostream. | |
void | ola::strings::FormatData (std::ostream *out, const uint8_t *data, unsigned int length, unsigned int indent=0, unsigned int byte_per_line=8) |
Write binary data to an ostream in a human readable form. | |
void ola::strings::FormatData | ( | std::ostream * | out, |
const uint8_t * | data, | ||
unsigned int | length, | ||
unsigned int | indent = 0, | ||
unsigned int | byte_per_line = 8 ) |
Write binary data to an ostream in a human readable form.
out | the ostream to write to |
data | pointer to the data |
length | length of the data |
indent | the number of spaces to prefix each line with |
byte_per_line | the number of bytes to display per line |
std::string ola::strings::IntToString | ( | int | i | ) |
Convert an int to a string.
i | the int to convert |
std::string ola::strings::IntToString | ( | unsigned int | i | ) |
Convert an unsigned int to a string.
i | the unsigned int to convert |
_ToHex< T > ola::strings::ToHex | ( | T | v, |
bool | prefix = true ) |
Convert a value to a hex string.
Automatic constructor for _ToHex that deals with widths
T | the type of value to convert |
v | the value to convert |
prefix | show the 0x prefix |