|
Zth (libzth)
|
Classes | |
| struct | zth::vector_type< T > |
std::vector type using Config::Allocator::type. More... | |
| struct | zth::map_type< Key, T, Compare > |
std::map type using Config::Allocator::type. More... | |
| struct | zth::list_type< T > |
std::list type using Config::Allocator::type. More... | |
| class | zth::Runnable |
| An abstract class, that can be started as a fiber. More... | |
| class | zth::UniqueID< T, ThreadSafe > |
Keeps track of a process-wide unique ID within the type T. 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... | |
Macros | |
| #define | ZTH_CLASS_NEW_DELETE(T) |
| Define new/delete operators for a class, which are allocator-aware. More... | |
| #define | zth_dbg(group, fmt, a...) |
| Debug printf()-like function. More... | |
| #define | ZTH_VERSION_MAJOR 1 |
| Zth major version as int. More... | |
| #define | ZTH_VERSION_MINOR 1 |
| Zth minor version as int. More... | |
| #define | ZTH_VERSION_PATCH 1 |
| Zth patch version as int. More... | |
| #define | ZTH_VERSION_SUFFIX "-alpha" |
| Zth version suffix as string literal. More... | |
| #define | ZTH_VERSION |
| Zth version as string literal. More... | |
| #define | ZTH_VERSION_NUM |
| Zth version as number. More... | |
Typedefs | |
| typedef std::basic_string< char, std::char_traits< char >, Config::Allocator< char >::type > | zth::string |
| std::string type using Config::Allocator::type. More... | |
Functions | |
| void | zth::log_color (int color, char const *fmt,...) |
| Logs a given printf()-like formatted string using an ANSI color code. More... | |
| void | zth::logv (char const *fmt, va_list arg) |
| Logs a given printf()-like formatted string. More... | |
| void | zth::log (char const *fmt,...) |
| Logs a given printf()-like formatted string. More... | |
| constexpr char const * | zth::version () noexcept |
| Returns the version of Zth. More... | |
| char const * | zth::banner () noexcept |
| Prints a banner line with version and configuration information. More... | |
| void | zth::abort (char const *fmt,...) noexcept |
| Aborts the process after printing the given printf() formatted message. More... | |
| void | zth::abortv (char const *fmt, va_list args) noexcept |
| Aborts the process after printing the given printf() formatted message. More... | |
| void | zth::log_colorv (int color, char const *fmt, va_list args) |
| Logs a given printf()-like formatted string using an ANSI color code. More... | |
| #define ZTH_CLASS_NEW_DELETE | ( | T | ) |
Define new/delete operators for a class, which are allocator-aware.
Put a call to this macro in the private section of your class definition. Additionally, make sure to have a virtual destructor to deallocate subclasses properly.
| T | the type of the class for which the operators are to be defined |
Definition at line 114 of file allocator.h.
| #define zth_dbg | ( | group, | |
| fmt, | |||
| a... | |||
| ) |
Debug printf()-like function.
Prints the given string for debugging purposes. The string is subject to the EnableDebugPrint configuration, and ANSI coloring.
| group | one of the zth::Config::Print_x, where only x has to be specified |
| fmt | printf()-like formatting string |
| a | arguments for fmt |
| #define ZTH_VERSION_MAJOR 1 |
Zth major version as int.
| #define ZTH_VERSION_MINOR 1 |
Zth minor version as int.
| #define ZTH_VERSION_NUM |
| #define ZTH_VERSION_PATCH 1 |
Zth patch version as int.
| #define ZTH_VERSION_SUFFIX "-alpha" |
Zth version suffix as string literal.
| typedef std::basic_string<char, std::char_traits<char>, Config::Allocator<char>::type> zth::string |
std::string type using Config::Allocator::type.
|
noexcept |
Aborts the process after printing the given printf() formatted message.
|
noexcept |
|
noexcept |
Prints a banner line with version and configuration information.
|
inline |
Logs a given printf()-like formatted string.
zth_logv() is used for the actual logging.
|
inline |
Logs a given printf()-like formatted string using an ANSI color code.
zth_logv() is used for the actual logging.
| void zth::log_colorv | ( | int | color, |
| char const * | fmt, | ||
| va_list | args | ||
| ) |
Logs a given printf()-like formatted string using an ANSI color code.
zth_logv() is used for the actual logging.
|
inline |
Logs a given printf()-like formatted string.
zth_logv() is used for the actual logging.