|
| class | zth::cow_string |
| | Copy-on-write string. More...
|
| |
| class | zth::UniqueIDBase |
| |
| class | zth::UniqueID< T, ThreadSafe > |
| | Keeps track of a process-wide unique ID within the type T. More...
|
| |
| struct | zth::choose_type< T, WhenTIsVoid > |
| |
| struct | zth::choose_type< void, WhenTIsVoid > |
| |
| struct | zth::Sequence<... > |
| |
| class | zth::safe_ptr< T > |
| | Wrapper for a pointer, which checks validity of the pointer upon dereference. More...
|
| |
| class | zth::Singleton< T > |
| | Singleton pattern. More...
|
| |
| class | zth::ThreadLocalSingleton< T > |
| | Singleton pattern, but only per-thread. More...
|
| |
| class | zth::small_vector< T, Prealloc, Allocator > |
| | A simple std::vector, which can contain Prealloc without heap allocation. More...
|
| |
| struct | zth::smallest_uint_size< size > |
| |
| struct | zth::smallest_uint< x, smallest_uint_size< 1 > > |
| |
| struct | zth::smallest_uint< x, smallest_uint_size< 2 > > |
| |
| struct | zth::smallest_uint< x, smallest_uint_size< 4 > > |
| |
|
| #define | ZTH_STRINGIFY_(x) #x |
| | Helper for ZTH_STRINGIFY()
|
| |
| #define | ZTH_STRINGIFY(x) ZTH_STRINGIFY_(x) |
| | Converts the argument to a string literal.
|
| |
| #define | likely(expr) __builtin_expect(!!(expr) /* NOLINT(readability-simplify-boolean-expr) */, 1) |
| | Marks the given expression to likely be evaluated to true.
|
| |
| #define | unlikely(expr) __builtin_expect(!!(expr) /* NOLINT(readability-simplify-boolean-expr) */, 0) |
| | Marks the given expression to likely be evaluated to true.
|
| |
| #define | ZTH_GET_MACRO_ARGN( _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, NAME, ...) NAME |
| | Helper for FOREACH and REVERSE.
|
| |
| #define | REVERSE_0() |
| |
| #define | REVERSE_1(a) a |
| |
| #define | REVERSE_2(a, ...) REVERSE_1(__VA_ARGS__), a |
| |
| #define | REVERSE_3(a, ...) REVERSE_2(__VA_ARGS__), a |
| |
| #define | REVERSE_4(a, ...) REVERSE_3(__VA_ARGS__), a |
| |
| #define | REVERSE_5(a, ...) REVERSE_4(__VA_ARGS__), a |
| |
| #define | REVERSE_6(a, ...) REVERSE_5(__VA_ARGS__), a |
| |
| #define | REVERSE_7(a, ...) REVERSE_6(__VA_ARGS__), a |
| |
| #define | REVERSE_8(a, ...) REVERSE_7(__VA_ARGS__), a |
| |
| #define | REVERSE_9(a, ...) REVERSE_8(__VA_ARGS__), a |
| |
| #define | REVERSE_10(a, ...) REVERSE_9(__VA_ARGS__), a |
| |
| #define | REVERSE_11(a, ...) REVERSE_10(__VA_ARGS__), a |
| |
| #define | REVERSE_12(a, ...) REVERSE_11(__VA_ARGS__), a |
| |
| #define | REVERSE_13(a, ...) REVERSE_12(__VA_ARGS__), a |
| |
| #define | REVERSE_14(a, ...) REVERSE_13(__VA_ARGS__), a |
| |
| #define | REVERSE_15(a, ...) REVERSE_14(__VA_ARGS__), a |
| |
| #define | REVERSE_16(a, ...) REVERSE_15(__VA_ARGS__), a |
| |
| #define | REVERSE(...) |
| |
| #define | ZTH_DBG_PREFIX " > " |
| | Prefix for every zth_dbg() call.
|
| |
| #define | zth_dbg(group, fmt, a...) |
| | Debug printf()-like function.
|
| |
| #define | zth_assert(expr) |
| | assert(), but better integrated in Zth.
|
| |
| #define | ZTH_CLASS_NOCOPY(Class) |
| |
|
| void | zth_logv (char const *fmt, va_list arg) |
| | Prints the given printf()-like formatted string to stdout.
|
| |
| char const * | zth::banner () noexcept |
| | Prints a banner line with version and configuration information.
|
| |
| void | zth::abort (char const *fmt,...) noexcept |
| | Aborts the process after printing the given printf() formatted message.
|
| |
| void | zth::abortv (char const *fmt, va_list args) noexcept |
| | Aborts the process after printing the given printf() formatted message.
|
| |
| void | zth::assert_handler (char const *file, int line, char const *expr) |
| |
| bool | zth::log_supports_ansi_colors () noexcept |
| | Returns if the system supports ANSI colors.
|
| |
| void | zth::log_colorv (int color, char const *fmt, va_list args) |
| | Logs a given printf()-like formatted string using an ANSI color code.
|
| |
| void | zth::log_color (int color, char const *fmt,...) |
| | Logs a given printf()-like formatted string using an ANSI color code.
|
| |
| void | zth::logv (char const *fmt, va_list arg) |
| | Logs a given printf()-like formatted string.
|
| |
| void | zth::log (char const *fmt,...) |
| | Logs a given printf()-like formatted string.
|
| |
| string | zth::formatv (char const *fmt, va_list args) |
| | Format like vsprintf(), but save the result in an zth::string.
|
| |
| string | zth::format (char const *fmt,...) |
| | Format like sprintf(), but save the result in an zth::string.
|
| |
| template<typename T > |
| cow_string | zth::str (T value) |
| | Returns an zth::string representation of the given value.
|
| |
| template<> |
| cow_string | zth::str< char > (char value) |
| |
| template<> |
| cow_string | zth::str< signed char > (signed char value) |
| |
| template<> |
| cow_string | zth::str< unsigned char > (unsigned char value) |
| |
| template<> |
| cow_string | zth::str< short > (short value) |
| |
| template<> |
| cow_string | zth::str< unsigned short > (unsigned short value) |
| |
| template<> |
| cow_string | zth::str< int > (int value) |
| |
| template<> |
| cow_string | zth::str< unsigned int > (unsigned int value) |
| |
| template<> |
| cow_string | zth::str< long > (long value) |
| |
| template<> |
| cow_string | zth::str< unsigned long > (unsigned long value) |
| |
| template<> |
| cow_string | zth::str< long long > (long long value) |
| |
| template<> |
| cow_string | zth::str< unsigned long long > (unsigned long long value) |
| |
| template<> |
| cow_string | zth::str< float > (float value) |
| |
| template<> |
| cow_string | zth::str< double > (double value) |
| |
| template<> |
| cow_string | zth::str< long double > (long double value) |
| |
| template<> |
| cow_string | zth::str< string && > (string &&value) |
| |
| string | zth::err (int e) |
| | Return a string like strerror() does, but as a zth::string.
|
| |
| template<> |
| cow_string | zth::str< UniqueIDBase const & > (UniqueIDBase const &value) |
| |
| void | zth_banner () |
| | Prints a banner line with version and configuration information.
|
| |
| void | zth_abort (char const *fmt,...) |
| | Aborts the process after printing the given printf() formatted message.
|
| |
| void | zth_log_color (int color, char const *fmt,...) |
| | Logs a given printf()-like formatted string using an ANSI color code.
|
| |
| void | zth_log (char const *fmt,...) |
| | Logs a given printf()-like formatted string.
|
| |