c4c23e9cc6
- evil hacks are not fun (blt::nbt::_internal_ forward declares list and compound for use inside list / compound) - list could be made faster by bulk allocating when type is known however i believe the compiler is smart enough to do this for me - testing that should be a todo! |
||
---|---|---|
include/blt | ||
src | ||
.gitignore | ||
.gitmodules | ||
CMakeLists.txt | ||
CMakeSettings.json | ||
LICENSE | ||
README.md | ||
build_and_run_debug.sh | ||
commit.sh | ||
design.txt | ||
icon.png | ||
icon_large.png | ||
icon_small.png |
README.md
BLT v0.6.1a
A C++20 common utilities library to make thing easy!
Specialties
blt::logging.v2
Found in the header file include/std/logging.h
, blt::logging is a fast and simple
single header logging library which can be used independently of BLT. Just include
the header file anywhere in your project and in ONE cpp file define #define BLT_LOGGING_IMPLEMENTATION
.
If you are using BLT as a CMake library (as you should!) this is done for you.
-
Compile Time Config
- Using CMake
- Several options are provided which disable various logging contexts, as such global logging can be disabled by passing
-DBLT_DISABLE_LOGGING:BOOL=ON
- Options follow the pattern of
BLT_DISABLE_LEVEL
where level is one ofTRACE
,DEBUG
,INFO
,WARN
,ERROR
, orFATAL
.- This allows for individual logging levels to be disabled while leaving the others functional. These options can be combined.
- See CMakeLists.txt for a complete list of options.
- Several options are provided which disable various logging contexts, as such global logging can be disabled by passing
- Standalone
- The CMake options define global variables in a config file. If you are using logging standalone you will need to remove the config include.
- Macros can be used in the same pattern of
BLT_DISABLE_LEVEL
to disable the various logging levels
- Using CMake
Features / Examples
-
Data Structures
- Queue / Stack
- faster than std::queue / std::stack
- backed by a contiguous array
- Queue / Stack
-
Utility
- Simple Random Wrapper Interface
- Simple random functions based on the PCG Hash
-
String Functions
- starts_with
- ends_with
- contains
- toLowerCase
- toUpperCase
- split
- trim
- Logging
- See blt::logging section above
- Time
- Current time in nanoseconds (without all the c++ gobbledygook)
- Java's currentTimeMilliseconds
- nanoTime as well
std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count()
becomesblt::system::nanoTime()
- Formatted time string with year/month/date + current time
- Current time in nanoseconds (without all the c++ gobbledygook)
-
Profiling
- Basic profiler with history and formatted output