- Notifications
You must be signed in to change notification settings - Fork0
Static library of whatever are seen required in general purpose but not directly supported from Modern C++. Or whatever reusable originated from my side projects.
License
buck-yeh/bux
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 fromModern C++. Or whatever is deemed reusable from my side projects.
Doxygen-generated API reference ishere. 💡 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.
Table of contents
Make sure you have installed
yay
or any otherpacman wrapperyay -S bux
To define target executable
foo
usingbux
inCMakeLists.txt
add_executable(foo foo.cpp)target_compile_options(fooPRIVATE -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
Build from github in MacOS or any ofLinux distros
Make sure you have installed the following tools or the likes:
cmake
(3.18 or newer)make
gcc
(13 or newer) orclang
(usually thru installing xcode on MacOS)git
git clone https://github.com/buck-yeh/bux.gitcd buxcmake.make -jBUX_DIR="/full/path/to/current/dir"
p.s. You can install a tagged version by replacing
main
withtag name.To define target executable
foo
usingbux
inCMakeLists.txt
add_executable(foo foo.cpp)target_compile_features(fooPRIVATE cxx_std_23)target_include_directories(fooPRIVATE"$env{BUX_DIR}/include")target_link_directories(fooPRIVATE"$env{BUX_DIR}/src")target_link_libraries(foo bux)
Include the header files by prefixing header names 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.txtcmake. -DBUILD_TEST=1make
And test all of them:
cdtestctest.
PS F:\vcpkg> .\vcpkg.exe search buxbuck-yeh-bux1.11.0 A supplemental C++ library with functionalities not directly supported fro...buck-yeh-bux-sqlite1.0.5 Modern C++ wrapper classes and utilities of the original sqlite3 APIThe 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/issuesPS F:\vcpkg>
Install
buck-yeh-bux
with triplets you needed. For example:PS F:\vcpkg> .\vcpkg.exe install buck-yeh-bux:x64-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 - Definepartial ordering as container in order to generate a compatiblelinear ordering.
- XQue.h - An efficient generic queue.
- Xtack.h - Generic stack types.
- EZArgs.h - Inspired by Pythonargparse.ArgumentParser with interfaces making sense to Modern C++
- LogStream.h - Fundation functions for
std::ostream
, used indirectly by logger macros such asLOG()
, ... - 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 withsingleton
bux::logger()
in mind. - LogLevel.h - LL_FATAL, LL_ERROR, LL_WARNING, LL_INFO, LL_DEBUG, 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 ofthread-safe loggers.
- FA.h - Supports to finite automaton,aka finite state machine,aka regular expression, emphasizing on minimizingNFA intoDFA.
- GLR.h - Implementation ofGeneralizedLR 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,akalexical analyzer, mainly used by
scannergen
- LexBase.h - Basic supports to createlexical tokens and parsers.
- LR1.h - Implementation ofLR1 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 - Conditionally defined macros, types, functions for as many platforms as possible.
- 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 asother exceptions, with location & formatted message.
About
Static library of whatever are seen required in general purpose but not directly supported from Modern C++. Or whatever reusable originated from my side projects.