Classes | |
class | Aseba::BasicFormatableString< charT > |
struct | Aseba::UnifiedTime |
Time or durations, in milliseconds. More... | |
Typedefs | |
typedef BasicFormatableString < char > | Aseba::FormatableString |
typedef BasicFormatableString < wchar_t > | Aseba::WFormatableString |
Functions | |
BasicFormatableString & | Aseba::BasicFormatableString< charT >::arg (int value, int fieldWidth=0, int base=10, charT fillChar= ' ') |
BasicFormatableString & | Aseba::BasicFormatableString< charT >::arg (unsigned value, int fieldWidth=0, int base=10, charT fillChar= ' ') |
BasicFormatableString & | Aseba::BasicFormatableString< charT >::arg (float value, int fieldWidth=0, int precision=6, charT fillChar= ' ') |
static uint16 | Aseba::crc_xmodem_update (uint16 crc, uint8 data) |
static uint16 | Aseba::crc_xmodem_update (uint16 crc, const uint8 *data, size_t len) |
uint16 | Aseba::crcXModem (const uint16 oldCrc, const std::wstring &s) |
Update the XModem CRC (x^16 + x^12 + x^5 + 1 (0x1021)) with a wstring. | |
uint16 | Aseba::crcXModem (const uint16 oldCrc, const uint16 v) |
Update the XModem CRC (x^16 + x^12 + x^5 + 1 (0x1021)) with a uint16 value. | |
void | Aseba::dumpTime (std::ostream &stream, bool raw=false) |
Dump the current time to a stream. | |
static UnifiedTime | Aseba::UnifiedTime::fromRawTimeString (const std::string &rawTimeString) |
Return the time from the raw time string. | |
BasicFormatableString & | Aseba::BasicFormatableString< charT >::operator= (const S &str) |
template<typename Derived , typename Base > | |
static Derived | Aseba::polymorphic_downcast (Base base) |
Asserts a dynamic cast. Similar to the one in boost/cast.hpp. | |
template<typename Derived , typename Base > | |
static Derived | Aseba::polymorphic_downcast_or_null (Base base) |
Asserts a dynamic cast or a null. Similar to the one in boost/cast.hpp. | |
void | Aseba::BasicFormatableString< charT >::proceedReplace (const S &replacement) |
void | Aseba::UnifiedTime::sleep () const |
Sleep for this amount of time. | |
std::string | Aseba::UnifiedTime::toHumanReadableStringFromEpoch () const |
Create a human readable string with this time. | |
std::string | Aseba::UnifiedTime::toRawTimeString () const |
Return the raw time string representing this time. | |
Aseba::UnifiedTime::UnifiedTime () | |
Constructor, set time to current time. | |
Aseba::UnifiedTime::UnifiedTime (Value ms) | |
Constructor, from a specific number of ms. | |
Aseba::UnifiedTime::UnifiedTime (Value seconds, Value milliseconds) | |
Constructor, from a specific number of seconds and ms. | |
std::wstring | Aseba::UTF8ToWString (const std::string &s) |
Transform a UTF8 string into a wstring, this function is thread-safe. | |
std::string | Aseba::WStringToUTF8 (const std::wstring &s) |
Transform a wstring into an UTF8 string, this function is thread-safe. |
typedef BasicFormatableString<char> Aseba::FormatableString |
Definition at line 120 of file FormatableString.h.
typedef BasicFormatableString<wchar_t> Aseba::WFormatableString |
Definition at line 121 of file FormatableString.h.
BasicFormatableString< charT > & Aseba::BasicFormatableString< charT >::arg | ( | int | value, |
int | fieldWidth = 0 , |
||
int | base = 10 , |
||
charT | fillChar = ' ' |
||
) |
Replace the next arg by an int value.
value | Value used to replace the current argument. |
fieldWidth | min width of the displayed number |
base | Radix of the number (8, 10 or 16) |
fillChar | Character used to pad the number to reach fieldWidth |
Definition at line 47 of file FormatableString.cpp.
BasicFormatableString< charT > & Aseba::BasicFormatableString< charT >::arg | ( | unsigned | value, |
int | fieldWidth = 0 , |
||
int | base = 10 , |
||
charT | fillChar = ' ' |
||
) |
Replace the next arg by an int value.
value | Value used to replace the current argument. |
fieldWidth | min width of the displayed number |
base | Radix of the number (8, 10 or 16) |
fillChar | Character used to pad the number to reach fieldWidth |
Definition at line 64 of file FormatableString.cpp.
BasicFormatableString< charT > & Aseba::BasicFormatableString< charT >::arg | ( | float | value, |
int | fieldWidth = 0 , |
||
int | precision = 6 , |
||
charT | fillChar = ' ' |
||
) |
Replace the next arg by a float value.
value | Value used to replace the current argument. |
fieldWidth | min width of the displayed number. |
precision | Number of digits displayed. |
fillChar | Character used to pad the number to reach fieldWidth. |
Definition at line 81 of file FormatableString.cpp.
static uint16 Aseba::crc_xmodem_update | ( | uint16 | crc, |
uint8 | data | ||
) | [static] |
static uint16 Aseba::crc_xmodem_update | ( | uint16 | crc, |
const uint8 * | data, | ||
size_t | len | ||
) | [static] |
uint16 Aseba::crcXModem | ( | const uint16 | oldCrc, |
const std::wstring & | s | ||
) |
uint16 Aseba::crcXModem | ( | const uint16 | oldCrc, |
const uint16 | v | ||
) |
void Aseba::dumpTime | ( | std::ostream & | stream, |
bool | raw | ||
) |
UnifiedTime Aseba::UnifiedTime::fromRawTimeString | ( | const std::string & | rawTimeString | ) | [static] |
BasicFormatableString< charT > & Aseba::BasicFormatableString< charT >::operator= | ( | const S & | str | ) |
Affects a new value to the format string and reset the arguments counter.
str | New format string. |
Definition at line 99 of file FormatableString.cpp.
static Derived Aseba::polymorphic_downcast | ( | Base | base | ) | [inline, static] |
static Derived Aseba::polymorphic_downcast_or_null | ( | Base | base | ) | [inline, static] |
void Aseba::BasicFormatableString< charT >::proceedReplace | ( | const S & | replacement | ) | [private] |
Replace the next argument by replacement.
Definition at line 36 of file FormatableString.cpp.
void Aseba::UnifiedTime::sleep | ( | ) | const |
std::string Aseba::UnifiedTime::toHumanReadableStringFromEpoch | ( | ) | const |
std::string Aseba::UnifiedTime::toRawTimeString | ( | ) | const |
Aseba::UnifiedTime::UnifiedTime | ( | Value | seconds, |
Value | milliseconds | ||
) |
std::wstring Aseba::UTF8ToWString | ( | const std::string & | s | ) |
std::string Aseba::WStringToUTF8 | ( | const std::wstring & | s | ) |