AnCH framework base namespace. More...
Namespaces | |
namespace | crypto |
Cryptography namespace. | |
namespace | date |
Date namespace. | |
namespace | device |
Device management namespace. | |
namespace | events |
Events management namespace. | |
namespace | json |
JSON namespace. | |
namespace | logger |
Logger namespace. | |
namespace | network |
Network namespace. | |
namespace | resource |
Resources namespace. | |
namespace | sql |
SQL namespace. | |
Classes | |
class | Collectors |
Stream collector functions. More... | |
class | Fluent |
Java style fuent class. More... | |
class | Flux |
Manage collection as stream. More... | |
struct | LessPtrCompare |
Less comparator based on object address. More... | |
class | Optional |
std::optional usefull methods. More... | |
class | Singleton |
Meyers' singleton implementation. More... | |
class | ThreadPool |
Thread pool utility class. More... | |
class | UUID |
UUID generator and parser. More... | |
Functions | |
template<typename N> | |
N | convert (const std::string &str) |
template<typename T> | |
void | byteSwap (T src, uint8_t *dest) |
bool | isBigEndian () |
bool | isLittleEndian () |
template<typename T> | |
void | applyIfValue (std::optional< T > &value, std::function< void(const T &)> func) |
template<typename T> | |
void | applyIfValueOrElse (std::optional< T > &value, std::function< void(const T &)> func, std::function< void()> fallback) |
void | toLower (std::string &value) |
void | toUpper (std::string &value) |
AnCH framework base namespace.
Contains utility classes from AnCH utils and UUID libraries.
|
inline |
Apply treatment if optional has value
value | the optional value |
func | the treatment to apply when optional has value |
|
inline |
Apply treatment if optional has value or apply fallback treatment
value | the optional value |
func | the treatment to apply when optional has value |
fallback | the treatment to apply when optional has no value |
void anch::byteSwap | ( | T | src, |
uint8_t * | dest ) |
Switch data endianness.
src | the object to convert |
dest | the converted bytes |
N anch::convert | ( | const std::string & | str | ) |
Performs strict conversion from std::string
to number
str | the string to convert |
std::bad_cast | conversion error |
bool anch::isBigEndian | ( | ) |
Check if system is in big endian bytes order.
true
if system is big endian, false
otherwisebool anch::isLittleEndian | ( | ) |
Check if system is in little endian bytes order.
true
if system is little endian, false
otherwisevoid anch::toLower | ( | std::string & | value | ) |
Transform input string to lower caser
value | the string to transform |
void anch::toUpper | ( | std::string & | value | ) |
Transform input string to upper caser
value | the string to transform |