Personal all-purpose utility library
Go to file
doylet b1eab3abdf Add capturing of stdout/stderr output in exec API 2024-03-25 13:14:05 +11:00
External Bundle external libraries with the include files 2024-02-26 21:04:02 +11:00
Standalone Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
.gitignore Inline the code directory 2021-08-09 09:03:15 +10:00
_clang-format dqn: Implement stack trace for windows 2023-08-31 01:03:48 +10:00
build.bat Allow exiting on error from the creation of an error sink 2024-02-29 21:30:06 +11:00
build.sh dqn: Forward Dqn_String8 implementation to Dqn_CString8 2022-10-15 17:12:13 +11:00
dqn.h Bundle external libraries with the include files 2024-02-26 21:04:02 +11:00
dqn_allocator.cpp Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_allocator.h Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_base.cpp Add error sink ignore API 2024-03-25 13:13:43 +11:00
dqn_base.h Add error sink ignore API 2024-03-25 13:13:43 +11:00
dqn_cgen.cpp Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_cgen.h Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_containers.cpp Import latest changes from CSIGHT project 2024-01-31 23:49:23 +11:00
dqn_containers.h Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_cppbuild.h Add capturing of stdout/stderr output in exec API 2024-03-25 13:14:05 +11:00
dqn_debug.cpp Import latest changes from CSIGHT project 2024-01-31 23:49:23 +11:00
dqn_debug.h Import latest changes from CSIGHT project 2024-01-31 23:49:23 +11:00
dqn_docs.cpp Allow exiting on error from the creation of an error sink 2024-02-29 21:30:06 +11:00
dqn_external.cpp Import latest changes from CSIGHT project 2024-01-31 23:49:23 +11:00
dqn_external.h Import latest changes from CSIGHT project 2024-01-31 23:49:23 +11:00
dqn_hash.cpp Import latest changes from CSIGHT project 2024-01-31 23:49:23 +11:00
dqn_hash.h Import latest changes from CSIGHT project 2024-01-31 23:49:23 +11:00
dqn_helpers.cpp Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_helpers.h Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_json.h Add dqn_cgen, reorganise files into standalone/external dirs 2024-02-26 00:15:09 +11:00
dqn_math.cpp Import latest changes from CSIGHT project 2024-01-31 23:49:23 +11:00
dqn_math.h Import latest changes from CSIGHT project 2024-01-31 23:49:23 +11:00
dqn_os.cpp Add capturing of stdout/stderr output in exec API 2024-03-25 13:14:05 +11:00
dqn_os.h Add capturing of stdout/stderr output in exec API 2024-03-25 13:14:05 +11:00
dqn_os_posix.cpp Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_os_win32.cpp Add capturing of stdout/stderr output in exec API 2024-03-25 13:14:05 +11:00
dqn_os_win32.h Add date to unix time, fix buggy array and arena prototype 2024-02-25 22:37:14 +11:00
dqn_string.cpp Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_string.h Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_thread_context.cpp Add new ErrorSink API to collate error from API calls 2024-02-11 16:14:00 +11:00
dqn_thread_context.h Add new ErrorSink API to collate error from API calls 2024-02-11 16:14:00 +11:00
dqn_type_info.h Import latest revision of dqn lib from CSIGHT 2024-03-19 23:11:00 +11:00
dqn_unit_tests.cpp Add dqn_cgen, reorganise files into standalone/external dirs 2024-02-26 00:15:09 +11:00
dqn_win32.h Add capturing of stdout/stderr output in exec API 2024-03-25 13:14:05 +11:00
readme.md dqn: Fix up some grammar 2023-07-16 18:01:29 +10:00

readme.md

Dqn

My personal standard library that provides allocator aware data structures, custom memory allocators and various miscellaneous helpers for prototyping. The library is a unity-build style library where data structures and functions are separated by category into files for organisation. You only need to include dqn.h which amalgamates all the files into one translation unit.

Build

To build with this library, copy all the *.[h|cpp] files at the root of the repository to your desired location, accessible by your project and in one header file include the header.

#include "dqn.h"

dqn.h includes all other files and their declaration into your header. In one .cpp file define the macro to enable the implementation of the header in that translation unit.

#define DQN_IMPLEMENTATION
#include "dqn.h"

Finally ensure that the compiler has in its search paths for the include directory where headers are located, e.g. -I <path/to/dqn/headers>.

Customisation

The headers provide macros to compile out sections that are not needed. This can be useful to speed up compile times or reduce binary size if you only need a particular part of the library. Each header contains a table-of-contents that denotes the macro to define to disable that section that should be defined before the header include.

#define DQN_NO_VARRAY       // Disable virtual array container
#define DQN_NO_JSON_BUILDER // Disable the JSON string builder
#include "dqn.h"