-
bux
is not Buck's. It could be box! -
Supplemental static library of whatever are seen required in sense of general purpose but not directly supported from Modern C++. Or whatever is deemed reusable from my side projects.
-
Doxygen-generated API reference is here. 💡 Doxygen has been known for being insensitive to Modern C++ for so many years. Keywords like any of attributes, ... etc can be misinterpreted or simply dropped. Viewer's discretion is advised.
(Created by gh-md-toc)
in ArchLinux
-
Make sure you have installed
yay
or any other pacman wrapper -
yay -Ss bux
-
To define target executable
foo
usingbux
inCMakeLists.txt
add_executable(foo foo.cpp) target_compile_options(foo PRIVATE -std=c++2a) target_link_libraries(foo bux)
-
Include the header files by prefixing header name with
bux/
, for example:#include <bux/Logger.h>
p.s. Header files are in
/usr/include/bux
and compiler is expected to search/usr/include
by default. -
If directly using
gcc
orclang
is intended, the required compiler flags are-std=c++23 -lbux
from github in any of Linux distros
-
Make sure you have installed
cmake
(3.18 or newer)make
gcc
(13 or newer)git
, or the likes. -
git clone -b main --single-branch https://github.com/buck-yeh/bux.git . cmake . make -j BUX_DIR="/full/path/to/current/dir"
p.s. You can install a tagged version by replacing
main
with tag name. -
To define target executable
foo
usingbux
inCMakeLists.txt
add_executable(foo foo.cpp) target_compile_options(foo PRIVATE -std=c++2a) target_include_directories(foo PRIVATE "$env{BUX_DIR}/include") target_link_directories(foo PRIVATE "$env{BUX_DIR}/src") target_link_libraries(foo bux)
-
Include the header files by prefixing header name with
bux/
, for example:#include <bux/Logger.h>
-
If directly using command
gcc
orclang
is intended, the required compiler flags are-std=c++23 -I$BUX_DIR/include -L$BUX_DIR/src -lbux
-
Subdirectory
test/
is excluded by default. To build with it, reconfigurecmake
with:rm CMakeCache.txt cmake . -DBUILD_TEST=1 make
And test all of them:
cd test ctest .
-
PS F:\vcpkg> .\vcpkg.exe search bux buck-yeh-bux 1.6.8#2 A supplemental C++ library with functionalities not directly supported fro... buck-yeh-bux-mariadb-client 1.0.3#1 Loose-coupled throw-on-error C++20 wrapper classes and utilities over mysq... buck-yeh-bux-sqlite 1.0.1 Modern C++ wrapper classes and utilities of the original sqlite3 API The result may be outdated. Run `git pull` to get the latest results. If your port is not listed, please open an issue at and/or consider making a pull request. - https://github.com/Microsoft/vcpkg/issues PS F:\vcpkg>
-
Available triplets are:
buck-yeh-bux:x64-windows buck-yeh-bux:x64-windows-static buck-yeh-bux:x64-windows-static-md buck-yeh-bux:x86-windows buck-yeh-bux:x86-windows-static
-
Include the header files by prefixing header name with
bux/
, for example:#include <bux/Logger.h>
- Intervals.h -
std::C_Intervals<T>
defines its own arithmetics but is currently ever used byscannergen
- PartialOrdering.h - Define partial ordering as container in order to generate a compatible linear ordering.
- XQue.h - An efficient generic queue.
- Xtack.h - Generic stack types.
- EZArgs.h - Inspired by Python argparse.ArgumentParser with interfaces making sense to Modern C++
- LogStream.h - Marginal utilities for
std::ostream
, used by loggers. - MemIn.h - Drop-in replacement of C++98-deprecated
std::istrstream
. - MemOut.h - Drop-in replacement of C++98-deprecated
std::ostrstream
. (Not used recently) - Serialize.h - Simple functions to define serialization/deserialization in a symmetric way.
- StrUtil.h - String utilities.
- UnicodeCvt.h - Encode text stream to unicodes (
utf8
/utf16
/utf32
)
- FileLog.h -
bux::C_PathFmtLogSnap
can be configured to automatically change the output path, IOW to output to different files, according to the current timestamp. The object is a plugin tobux::C_ReenterableOstreamSnap
andbux::C_ParaLog
- Logger.h - Log macros for various needs with singleton
bux::logger()
in mind. - LogLevel.h - LL_FATAL, LL_ERROR, LL_WARNING, LL_INFO, LL_VERBOSE
- ParaLog.h -
bux::C_ParaLog
is a logger facade to reroute log lines to multiple child loggers - SyncLog.h - Basic classes to give variety of thread-safe loggers.
- FA.h - Supports to finite automaton, aka finite state machine, aka regular expression, emphasizing on minimizing NFA into DFA.
- GLR.h - Implementation of Generalized LR parser
- ImplGLR.h - Stuffs constantly needed by
parsergen
-generated *.cpp files for syntaxes classified as GLR. - ImplLR1.h - Stuffs constantly needed by
parsergen
-generated *.cpp files for syntaxes classified as LR1. - ImplScanner.h - Generic implementation of scanner, aka lexical analyzer, mainly used by
scannergen
- LexBase.h - Basic supports to create lexical tokens and parsers.
- LR1.h - Implementation of LR1 parser
- ParserBase.h - Common supports to all parsers.
- Range2Type.h -
bux::fittestType()
called byparsergen
&scannergen
. - ScannerBase.h - Generic supports to all scanners.
- FsUtil.h - Utilities solely related to <filesystem>
- XConsole.h - Cross-platform console functions.
- XPlatform.h - Most possibly macros & typedefs defined in per-platform fashions.
- AtomiX.h - Spin lock on
std::atomic_flag
& a mapping cache type using it.
- EZScape.h - Replacement of
curl_easy_escape()
&curl_easy_unescape()
inlibcurl
. - SafeArith.h - Supports to safe arithmetics. (Not used recently)
- XAutoPtr.h - Safe
std::auto_ptr
dated back to pre-C++11 years. It ain't broke ... - XException.h - Macros to throw
std::runtime_error
,std::logic_error
, as well as other exceptions, with location & formatted message.