bux API Reference 1.9.0
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.
|
THE common namespace of bux
library.
More...
Namespaces | |
namespace | GLR |
namespace | Helper_ |
namespace | LR1 |
namespace | user |
Function prototypes declared in this subnamespace are required to be implemented by user so that functions declared under namespace bux in the same header can be linked properly without errors. | |
Classes | |
struct | C_ActionRet |
class | C_AutoNode |
struct | C_AutoSinkHolderT |
struct | C_AutoSinkHolderT< T_Sink > |
class | C_DFA |
class | C_DtorFreeStack |
Safe instantiation for types which's destructor does exactly nothing. More... | |
class | C_EntryLog |
Log on both declaration point and end of block scope with an unique id. More... | |
struct | C_ErrorOrIndex |
class | C_EZArgs |
struct | C_FA_Traits |
struct | C_IMemBufAsMember |
class | C_IMemStreamT |
class | C_IntegerLex |
class | C_Intervals |
struct | C_KVPair |
struct | C_LexDataT |
Render any copyable "type" token attribute on the fly. More... | |
struct | C_LexInfoT |
struct | C_LexTraits |
struct | C_LexTraits< C_LexUTF32 > |
struct | C_LexUTF32 |
class | C_MBCStr |
class | C_NewNode |
class | C_NFA |
class | C_NfaState |
struct | C_OMemBufAsMemberT |
class | C_OMemStreamT |
struct | C_OstreamHolder |
class | C_ParaLog |
class | C_ParserLogCount |
class | C_ParserOStreamCount |
class | C_PartialOrdering |
class | C_PathFmtLogSnap |
class | C_PersistedSnapHolder |
class | C_Queue |
class | C_RawQueue |
class | C_ReenterableLogger |
class | C_ReenterableLoggerInside |
class | C_ResourceStack |
If ctor of type T properly handles ownership transfer, so does C_ResourceStack<T> More... | |
struct | C_RetLvalT |
class | C_ScannerImpl |
class | C_Screener |
class | C_ScreenerNo |
struct | C_SourcePos |
class | C_SpinCacheT |
class | C_SpinLock |
class | C_Stack |
A much more succinct substitute of std::stack<std::vector<T> > More... | |
class | C_StackBase |
Any given type is safely instantiated even though C_DtorFreeStack<T> does better for bytewise types. More... | |
class | C_SyncLogger |
class | C_UnicodeIn |
class | C_UseLog |
struct | C_Void |
class | FC_GetRelLexT |
struct | I_LexAttr |
struct | I_Parser |
struct | I_ReenterableLog |
Thread-unsafe implementation is preferred for performance. More... | |
struct | I_Scanner |
struct | I_SnapT |
< Parasitic Type More... | |
class | I_SyncLog |
</// Thread safety is expected More... | |
struct | T_CoConst_ |
struct | T_CoConst_< T, false > |
struct | T_CoConst_< T, true > |
union | U_K2V |
Concepts | |
concept | IntervalPt |
Typedefs | |
using | T_LexID = uint32_t |
using | C_IMemStream = C_IMemStreamT<char> |
using | C_OMemStream = C_OMemStreamT<char> |
using | T_StateID = unsigned |
template<class T , template< class > class C_Ptr> | |
using | F_GetProducedT = std::function<C_LexInfoT<T,C_Ptr> &(size_t)> |
template<class T_Data , class T_Dep > | |
using | T_CoConst = typename T_CoConst_<T_Data,std::is_const<T_Dep>::value>::type |
using | C_ReenterableOstream = C_ReenterableLogger<C_OstreamHolder> |
using | C_ReenterableOstreamSnap = C_ReenterableLogger<C_PersistedSnapHolder> |
typedef std::uint32_t | T_Utf32 |
UTF-32 to cover the full range of codespace U+0000 ~ U+10FFFF. | |
typedef std::uint16_t | T_Utf16 |
UTF-16: You need T_Utf16[2] to hold full range of unicode. | |
typedef std::uint8_t | T_Utf8 |
UTF-8: You need T_Utf8[4] to hold full range of unicode. | |
typedef std::function< std::optional< char >()> | FH_ReadChar |
Enumerations | |
enum | { FA_OPTIONAL = 1<<0 , FA_REPEATABLE = 1<<1 } |
enum | : uint32_t { TID_EOF = MIN_TOKEN_ID , ROOT_NID , TOKENGEN_LB } |
enum | E_LogLevel { LL_FATAL , LL_ERROR , LL_WARNING , LL_INFO , LL_VERBOSE } |
enum | E_MakeLinearPolicy { MLP_BREADTH_FIRST , MLP_DEPTH_FIRST } |
enum | { MAX_UTF16 = 2 , MAX_UTF8 = 6 , MAX_UTF8_BMP = 3 , MAX_UTF8_VALID = 4 , UIE_EOF = 0 , UIE_ILLFORMED_UNICODE = -1 , UIE_INCOMPLETE_UNICODE = -2 , UIE_NO_UNICODE_TRANSLATION = -3 , UIE_INTERNAL = -9 } |
Functions | |
std::string | easy_escape (std::string_view src) |
std::string | easy_unescape (std::string_view src) |
bool | operator== (const C_SourcePos &a, const C_SourcePos &b) noexcept |
Equivalence relation. | |
bool | operator< (const C_SourcePos &a, const C_SourcePos &b) noexcept |
Partial relation. | |
std::string | asciiLiteral (uint32_t utf32) |
std::string | asciiLiteral (std::string_view utf8) |
void | addAsHex (std::string &dst, uint32_t ch32) |
I_SyncLog & | logger () |
std::ostream & | stamp (const C_UseLog &u, E_LogLevel level) |
std::ostream & | timestamp (std::ostream &out, const std::chrono::time_zone *tz) |
std::ostream & | logTrace (std::ostream &out, const std::chrono::time_zone *tz) |
std::string | escseq2str (std::string s) |
bool | isIdentifier (std::string_view s) noexcept |
size_t | parseEscapeChar (std::string_view s, uint32_t &c, size_t pos) |
size_t | skipIdentifier (std::string_view s, size_t pos) noexcept |
size_t | read_size (const std::string &src, size_t &off) noexcept |
std::tuple< std::string, size_t, bool > | load_hashed_str (std::istream &in) |
size_t | save_hashed_str (std::ostream &out, const std::string &s) |
const char * | ord_suffix (size_t i) |
std::string | expand_env (const char *s) |
std::string | _HRTN (const char *originalName) |
std::string | OXCPT (const std::exception &e) |
std::string_view | to_utf8 (T_Utf32 uc) |
std::string | to_utf8 (std::string_view s, T_Encoding codepage) |
std::string | to_utf8 (std::istream &in, T_Encoding codepage) |
std::wstring | BOM (const std::wstring &ws) |
void | getKeyPunch (std::string_view msg, int &key, const char *keyFilter) |
void | pressAKey () |
bool | testWritability (const char *file) |
std::filesystem::path | search_dirs (const std::filesystem::path &in_path, const std::ranges::forward_range auto &dirs) |
template<IntervalPt T, class charT , class traits = std::char_traits<charT>> | |
std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &out, const C_Intervals< T > &x) |
template<class T > | |
auto | createLex (const T &t) |
template<class T > | |
auto | createLex (T &t) |
template<class T , class... T_Args> | |
auto | createLex (T_Args &&...args) |
template<class T_Key , class T_Value , class T_ValueOrSize , class T_Traits > | |
T_Value | index2value (U_K2V< T_Key, T_Value > k2v, T_ValueOrSize valOrSz, T_LexID key) |
template<class T > | |
auto & | unlex (I_LexAttr &lex) |
template<class T > | |
auto & | unlex (const I_LexAttr &lex) |
template<class T_Data , class T_Lex , template< class > class C_Ptr> | |
auto & | unlex (const C_Ptr< T_Lex > &lex) |
template<class T_Data , class T_Lex , template< class > class C_Ptr> | |
auto & | unlex (const C_LexInfoT< T_Lex, C_Ptr > &lex) |
template<class T_Data , class T_Lex , template< class > class C_Ptr> | |
T_CoConst< T_Data, T_Lex > * | tryUnlex (const C_Ptr< T_Lex > &lex) |
template<class T_Data , class T_Lex , template< class > class C_Ptr> | |
auto | tryUnlex (const C_LexInfoT< T_Lex, C_Ptr > &lex) |
template<class T_Lex , template< class > class C_Ptr> | |
int | toInt (const C_LexInfoT< T_Lex, C_Ptr > &lex) |
template<class C , class T > | |
void | addUnique (C &c, T &&value) |
template<std::integral T> | |
std::string | fittestType (T lb, T ub) |
template<class T > | |
T | addNoWrap (T a, T b) |
template<class T > | |
int | compareReturn (T a) |
template<class T_LexCh > | |
auto | toString (const T_LexCh *c, size_t start, size_t end) noexcept(noexcept(C_LexTraits< T_LexCh >::appendUTF8(std::declval< std::string & >(), T_LexCh()))) |
template<T_LexID _ID, class T_LexCh > | |
auto | createCharLiteral (const T_LexCh *c, size_t n) |
template<T_LexID _ID, class T_LexCh > | |
auto | createDecNum (const T_LexCh *c, size_t n) |
template<T_LexID _ID, class T_LexCh > | |
auto | createHexNum (const T_LexCh *c, size_t n) |
template<T_LexID _ID, class T_LexCh > | |
C_ActionRet | createNothing (const T_LexCh *, size_t) |
template<T_LexID _ID, class T_LexCh > | |
auto | createOctNum (const T_LexCh *c, size_t n) |
template<T_LexID _ID, class T_LexCh , size_t TRIMLEFT = 0, size_t TRIMRIGHT = 0> | |
auto | createPlainString (const T_LexCh *c, size_t n) |
template<T_LexID _ID, class T_LexCh , size_t TRIMLEFT = 0, size_t TRIMRIGHT = 0> | |
auto | createEscapeString (const T_LexCh *c, size_t n) |
template<class T_Char > | |
void | scanFile (std::string_view filename, std::istream &in, I_Scanner< T_Char > &scanner, T_LexID endToken=TID_EOF, T_Encoding encoding=0) |
template<class T > | |
void | append (const T &src, std::string &dst) |
template<class T > | |
void | append_size_of (const T &src, std::string &dst) |
template<class T > | |
void | append (const T *src, size_t argN, std::string &dst) |
template<class T > | |
void | read (const std::string &src, size_t &off, T &data) noexcept |
template<class T > | |
void | read (const std::string &src, size_t &off, T *data, size_t count) |
template<size_t N> | |
auto | to_str (const std::array< char, N > &arr) |
template<size_t N> | |
std::array< char, N > | read_charr (const std::string &src, size_t &off) noexcept |
template<size_t N, template< typename > class C> | |
void | append (const C< std::array< char, N > > &src, std::string &dst) |
template<size_t N, template< typename > class C> | |
void | read (const std::string &src, size_t &off, C< std::array< char, N > > &data) |
template<typename T > | |
auto | to_utf8 (const T *ps, size_t size=0, T_Encoding codepage=0) |
template<typename T > | |
auto | to_utf8 (std::basic_string_view< T > s, T_Encoding codepage=0) |
std::wstring | BOM (const std::wstring_view &ws) |
template<class T > | |
bool | operator< (const C_Stack< T > &a, const C_Stack< T > &b) noexcept |
Lexical comparison. | |
template<class T > | |
bool | operator== (const C_Stack< T > &a, const C_Stack< T > &b) noexcept |
template<class T > | |
bool | operator!= (const C_Stack< T > &a, const C_Stack< T > &b) noexcept |
template<class T > | |
void | operator+= (C_Stack< T > &a, const C_Stack< T > &b) |
template<class T > | |
void | operator+= (C_Stack< T > &out, const T *s) |
template<class T > | |
void | operator+= (C_ResourceStack< T > &a, C_StackBase< T > &b) |
template<class T > | |
auto & | operator<< (C_Stack< T > &a, const C_Stack< T > &b) |
template<class T > | |
auto & | operator<< (C_Stack< T > &out, const T *s) |
template<class T > | |
auto & | operator<< (C_ResourceStack< T > &a, C_StackBase< T > &b) |
template<class T > | |
auto & | operator<< (C_Stack< T > &out, const T &c) |
template<class T > | |
auto & | operator<< (C_ResourceStack< T > &out, T &t) |
template<class T > | |
auto & | operator<< (std::basic_ostream< T > &out, const C_Stack< T > &s) |
Variables | |
constinit const uint32_t | MIN_TOKEN_ID = 0x70000000 |
THE common namespace of bux
library.
using bux::C_IMemStream = C_IMemStreamT<char> |
using bux::C_OMemStream = C_OMemStreamT<char> |
using bux::F_GetProducedT = std::function<C_LexInfoT<T,C_Ptr> &(size_t)> |
Definition at line 20 of file ParserBase.h.
typedef std::function<std::optional<char>()> bux::FH_ReadChar |
Definition at line 43 of file UnicodeCvt.h.
using bux::T_CoConst = typename T_CoConst_<T_Data,std::is_const<T_Dep>::value>::type |
Definition at line 60 of file ParserBase.h.
using bux::T_LexID = uint32_t |
using bux::T_StateID = unsigned |
Definition at line 17 of file ParserBase.h.
typedef std::uint16_t bux::T_Utf16 |
UTF-16: You need T_Utf16[2] to hold full range of unicode.
Definition at line 40 of file UnicodeCvt.h.
typedef std::uint32_t bux::T_Utf32 |
UTF-32 to cover the full range of codespace U+0000 ~ U+10FFFF.
Definition at line 39 of file UnicodeCvt.h.
typedef std::uint8_t bux::T_Utf8 |
UTF-8: You need T_Utf8[4] to hold full range of unicode.
Definition at line 41 of file UnicodeCvt.h.
anonymous enum : uint32_t |
anonymous enum |
Enumerator | |
---|---|
MAX_UTF16 | |
MAX_UTF8 | |
MAX_UTF8_BMP | |
MAX_UTF8_VALID | |
UIE_EOF | |
UIE_ILLFORMED_UNICODE | |
UIE_INCOMPLETE_UNICODE | |
UIE_NO_UNICODE_TRANSLATION | |
UIE_INTERNAL |
Definition at line 21 of file UnicodeCvt.h.
enum bux::E_LogLevel |
Definition at line 8 of file LogLevel.h.
Enumerator | |
---|---|
MLP_BREADTH_FIRST | |
MLP_DEPTH_FIRST |
Definition at line 11 of file PartialOrdering.h.
std::string bux::_HRTN | ( | const char * | originalName | ) |
[in] | originalName | Compiler mangled or expanded type name, depending on which compiler you are using. |
Definition at line 70 of file StrUtil.cpp.
void bux::addAsHex | ( | std::string & | dst, |
uint32_t | ch32 ) |
Definition at line 121 of file LexBase.cpp.
|
inline |
Definition at line 31 of file SafeArith.h.
void bux::addUnique | ( | C & | c, |
T && | value ) |
Definition at line 68 of file PartialOrdering.h.
Referenced by bux::C_PartialOrdering< T >::getRelated(), bux::C_PartialOrdering< T >::getRelated(), and bux::C_PartialOrdering< T >::makeLinear().
void bux::append | ( | const C< std::array< char, N > > & | src, |
std::string & | dst ) |
Definition at line 69 of file Serialize.h.
References append_size_of(), and to_str().
void bux::append | ( | const T & | src, |
std::string & | dst ) |
Definition at line 14 of file Serialize.h.
Referenced by bux::C_MBCStr::append(), append_size_of(), bux::C_MBCStr::C_MBCStr(), bux::C_MBCStr::C_MBCStr(), bux::C_MBCStr::operator+=(), bux::C_MBCStr::operator+=(), and testWritability().
void bux::append | ( | const T * | src, |
size_t | argN, | ||
std::string & | dst ) |
Definition at line 27 of file Serialize.h.
void bux::append_size_of | ( | const T & | src, |
std::string & | dst ) |
Definition at line 21 of file Serialize.h.
References append().
Referenced by append().
std::string bux::asciiLiteral | ( | std::string_view | utf8 | ) |
Definition at line 105 of file LexBase.cpp.
References RUNTIME_ERROR.
std::string bux::asciiLiteral | ( | uint32_t | utf32 | ) |
Definition at line 98 of file LexBase.cpp.
Referenced by bux::GLR::I_ParserPolicy::printToken(), and bux::LR1::I_ParserPolicy::printToken().
std::wstring bux::BOM | ( | const std::wstring & | ws | ) |
Definition at line 202 of file UnicodeCvt.cpp.
std::wstring bux::BOM | ( | const std::wstring_view & | ws | ) |
|
inline |
Definition at line 37 of file SafeArith.h.
|
nodiscard |
Definition at line 103 of file ScannerBase.h.
References createLex(), parseEscapeChar(), RUNTIME_ERROR, and toString().
|
nodiscard |
Definition at line 114 of file ScannerBase.h.
References toString().
|
nodiscard |
Definition at line 144 of file ScannerBase.h.
References createLex(), escseq2str(), and toString().
|
nodiscard |
Definition at line 120 of file ScannerBase.h.
References toString().
auto bux::createLex | ( | const T & | t | ) |
Definition at line 205 of file LexBase.h.
Referenced by createCharLiteral(), createEscapeString(), and createPlainString().
auto bux::createLex | ( | T_Args &&... | args | ) |
|
nodiscard |
Definition at line 126 of file ScannerBase.h.
|
nodiscard |
Definition at line 132 of file ScannerBase.h.
References toString().
|
nodiscard |
Definition at line 138 of file ScannerBase.h.
References createLex(), and toString().
std::string bux::easy_escape | ( | std::string_view | src | ) |
Replacement of curl_easy_escape()
in curl
library
Definition at line 13 of file EZScape.cpp.
std::string bux::easy_unescape | ( | std::string_view | src | ) |
Replacement of curl_easy_unescape()
in curl
library
Definition at line 28 of file EZScape.cpp.
References THROW_AS.
|
nodiscard |
Definition at line 6 of file ScannerBase.cpp.
References parseEscapeChar(), and to_utf8().
Referenced by createEscapeString().
std::string bux::expand_env | ( | const char * | s | ) |
[in] | s | Input string containing environment variables. |
Definition at line 44 of file StrUtil.cpp.
std::string bux::fittestType | ( | T | lb, |
T | ub ) |
lb | Lower bound of value range |
ub | Upper bound of value range |
lb <= ub
Definition at line 14 of file Range2Type.h.
References HRTN.
void bux::getKeyPunch | ( | std::string_view | msg, |
int & | key, | ||
const char * | keyFilter ) |
Definition at line 165 of file XConsole.cpp.
Referenced by testWritability().
T_Value bux::index2value | ( | U_K2V< T_Key, T_Value > | k2v, |
T_ValueOrSize | valOrSz, | ||
T_LexID | key ) |
Definition at line 111 of file ParserBase.h.
References bux::U_K2V< T_Key, T_Value >::m_conv, and bux::U_K2V< T_Key, T_Value >::m_table.
|
nodiscardnoexcept |
Definition at line 24 of file ScannerBase.cpp.
References skipIdentifier().
std::tuple< std::string, size_t, bool > bux::load_hashed_str | ( | std::istream & | in | ) |
Definition at line 19 of file Serialize.cpp.
I_SyncLog & bux::logger | ( | ) |
Definition at line 20 of file Logger.cpp.
References bux::user::logger(), and stamp().
Referenced by bux::C_EntryLog::C_EntryLog(), bux::C_EntryLog::C_EntryLog(), and bux::C_EntryLog::~C_EntryLog().
std::ostream & bux::logTrace | ( | std::ostream & | out, |
const std::chrono::time_zone * | tz ) |
out | Output stream to add trace(line prefix) to. |
tz | Pointer to the time zone to convert system clock to. In case of nullptr, the timestamp will use system clock. |
Log timestamp & thread id
Definition at line 62 of file LogStream.cpp.
References TID_, and timestamp().
Referenced by stamp().
void bux::operator+= | ( | C_ResourceStack< T > & | a, |
C_StackBase< T > & | b ) |
Definition at line 319 of file Xtack.h.
References bux::C_StackBase< T >::begin(), bux::C_StackBase< T >::end(), and bux::C_ResourceStack< T >::push().
Definition at line 307 of file Xtack.h.
References bux::C_StackBase< T >::begin(), bux::C_StackBase< T >::end(), and bux::C_Stack< T >::push().
void bux::operator+= | ( | C_Stack< T > & | out, |
const T * | s ) |
Definition at line 313 of file Xtack.h.
References bux::C_Stack< T >::push().
|
noexcept |
Partial relation.
Definition at line 90 of file LexBase.cpp.
auto & bux::operator<< | ( | C_ResourceStack< T > & | a, |
C_StackBase< T > & | b ) |
Definition at line 339 of file Xtack.h.
References bux::C_StackBase< T >::begin(), bux::C_StackBase< T >::end(), and bux::C_ResourceStack< T >::push().
auto & bux::operator<< | ( | C_ResourceStack< T > & | out, |
T & | t ) |
Definition at line 353 of file Xtack.h.
References bux::C_ResourceStack< T >::push().
Definition at line 325 of file Xtack.h.
References bux::C_StackBase< T >::begin(), bux::C_Stack< T >::push(), and bux::C_StackBase< T >::size().
auto & bux::operator<< | ( | C_Stack< T > & | out, |
const T & | c ) |
Definition at line 346 of file Xtack.h.
References bux::C_Stack< T >::push().
auto & bux::operator<< | ( | C_Stack< T > & | out, |
const T * | s ) |
Definition at line 332 of file Xtack.h.
References bux::C_Stack< T >::push().
std::basic_ostream< charT, traits > & bux::operator<< | ( | std::basic_ostream< charT, traits > & | out, |
const C_Intervals< T > & | x ) |
Definition at line 1 of file Intervals.h.
auto & bux::operator<< | ( | std::basic_ostream< T > & | out, |
const C_Stack< T > & | s ) |
Definition at line 360 of file Xtack.h.
References bux::C_StackBase< T >::begin(), bux::C_StackBase< T >::empty(), and bux::C_StackBase< T >::size().
|
noexcept |
Equivalence relation.
Definition at line 83 of file LexBase.cpp.
const char * bux::ord_suffix | ( | size_t | i | ) |
[in] | i | Ordinal number |
st | if i == 1 |
nd | if i == 2 |
rd | if i == 3 |
th | else |
Definition at line 24 of file StrUtil.cpp.
std::string bux::OXCPT | ( | const std::exception & | e | ) |
[in] | e | Instance of std::exception descent |
Definition at line 128 of file StrUtil.cpp.
References HRTN.
|
nodiscard |
Definition at line 30 of file ScannerBase.cpp.
References RUNTIME_ERROR.
Referenced by createCharLiteral(), and escseq2str().
void bux::pressAKey | ( | ) |
Definition at line 183 of file XConsole.cpp.
void bux::read | ( | const std::string & | src, |
size_t & | off, | ||
C< std::array< char, N > > & | data ) |
Definition at line 85 of file Serialize.h.
References read_charr(), and read_size().
|
noexcept |
Definition at line 35 of file Serialize.h.
Referenced by read_size().
void bux::read | ( | const std::string & | src, |
size_t & | off, | ||
T * | data, | ||
size_t | count ) |
Definition at line 45 of file Serialize.h.
|
noexcept |
Definition at line 60 of file Serialize.h.
Referenced by read().
|
noexcept |
Definition at line 12 of file Serialize.cpp.
References read().
Referenced by read().
size_t bux::save_hashed_str | ( | std::ostream & | out, |
const std::string & | s ) |
Definition at line 27 of file Serialize.cpp.
void bux::scanFile | ( | std::string_view | filename, |
std::istream & | in, | ||
I_Scanner< T_Char > & | scanner, | ||
T_LexID | endToken = TID_EOF, | ||
T_Encoding | encoding = 0 ) |
Definition at line 150 of file ScannerBase.h.
References bux::I_Scanner< T_Char >::add(), bux::I_Scanner< T_Char >::setLine(), and bux::I_Scanner< T_Char >::setSource().
std::filesystem::path bux::search_dirs | ( | const std::filesystem::path & | in_path, |
const std::ranges::forward_range auto & | dirs ) |
|
nodiscardnoexcept |
Definition at line 88 of file ScannerBase.cpp.
Referenced by isIdentifier().
std::ostream & bux::stamp | ( | const C_UseLog & | u, |
E_LogLevel | level ) |
Definition at line 47 of file Logger.cpp.
References LL_ERROR, LL_FATAL, LL_INFO, LL_VERBOSE, LL_WARNING, logTrace(), RUNTIME_ERROR, bux::C_UseLog::stream(), and bux::C_UseLog::timezone().
Referenced by bux::C_EntryLog::C_EntryLog(), bux::C_EntryLog::C_EntryLog(), logger(), and bux::C_EntryLog::~C_EntryLog().
bool bux::testWritability | ( | const char * | file | ) |
Definition at line 195 of file XConsole.cpp.
References append(), and getKeyPunch().
std::ostream & bux::timestamp | ( | std::ostream & | out, |
const std::chrono::time_zone * | tz ) |
out | Output stream to add timestamp to. | |
[in] | tz | Pointer to the time zone to convert system clock to. In case of nullptr, the timestamp will use system clock. |
Write timestamp in format of "yyyy/mm/dd hh:mm:sss " to out.
Definition at line 32 of file LogStream.cpp.
Referenced by logTrace().
auto bux::to_str | ( | const std::array< char, N > & | arr | ) |
Definition at line 54 of file Serialize.h.
Referenced by append().
auto bux::to_utf8 | ( | const T * | ps, |
size_t | size = 0, | ||
T_Encoding | codepage = 0 ) |
Definition at line 185 of file UnicodeCvt.h.
References bux::C_MBCStr::strU8().
auto bux::to_utf8 | ( | std::basic_string_view< T > | s, |
T_Encoding | codepage = 0 ) |
Definition at line 187 of file UnicodeCvt.h.
References bux::C_MBCStr::strU8().
std::string bux::to_utf8 | ( | std::istream & | in, |
T_Encoding | codepage ) |
in | Reference of input stream passed to ctor of C_UnicodeIn |
codepage | Encoding type of input stream passed to ctor of C_UnicodeIn. Value 0 means C_UnicodeIn should guess the finest. |
HEADSUP: When codepage is 0 and in reference to a stream instance of type std::ifstream
, the instance should be opened in binary mode with std::ios::binary
for the case that the encoding is actually UTf-16(LE or BE) and input stream contains '\x1a' bytes (ascii EOF), e.g. as part of '\uff1a'. Or the input stream might hit EOF earlier than it should.
Definition at line 172 of file UnicodeCvt.cpp.
References MAX_UTF8, and RUNTIME_ERROR.
std::string bux::to_utf8 | ( | std::string_view | s, |
T_Encoding | codepage ) |
Definition at line 167 of file UnicodeCvt.cpp.
References bux::C_MBCStr::strU8().
std::string_view bux::to_utf8 | ( | T_Utf32 | uc | ) |
Definition at line 157 of file UnicodeCvt.cpp.
References MAX_UTF8, and RUNTIME_ERROR.
Referenced by bux::C_ScannerImpl< T_Input, T_State, T_Char, C_Traits >::add(), bux::C_LexTraits< C_LexUTF32 >::appendUTF8(), and escseq2str().
int bux::toInt | ( | const C_LexInfoT< T_Lex, C_Ptr > & | lex | ) |
Definition at line 178 of file ParserBase.h.
References bux::C_IntegerLex::value().
|
nodiscardnoexcept |
Definition at line 94 of file ScannerBase.h.
Referenced by createCharLiteral(), createDecNum(), createEscapeString(), createHexNum(), createOctNum(), and createPlainString().
auto bux::tryUnlex | ( | const C_LexInfoT< T_Lex, C_Ptr > & | lex | ) |
Definition at line 172 of file ParserBase.h.
References bux::C_LexInfoT< T, C_Ptr >::m_attr, and tryUnlex().
T_CoConst< T_Data, T_Lex > * bux::tryUnlex | ( | const C_Ptr< T_Lex > & | lex | ) |
Definition at line 163 of file ParserBase.h.
Referenced by bux::GLR::tryDupLex(), bux::GLR::tryDupLex(), and tryUnlex().
auto & bux::unlex | ( | const C_LexInfoT< T_Lex, C_Ptr > & | lex | ) |
Definition at line 157 of file ParserBase.h.
References bux::C_LexInfoT< T, C_Ptr >::m_attr, and unlex().
auto & bux::unlex | ( | const C_Ptr< T_Lex > & | lex | ) |
Definition at line 151 of file ParserBase.h.
References bux::C_LexDataT< T_Data >::m_data.
auto & bux::unlex | ( | const I_LexAttr & | lex | ) |
Definition at line 145 of file ParserBase.h.
auto & bux::unlex | ( | I_LexAttr & | lex | ) |
Definition at line 139 of file ParserBase.h.
Referenced by bux::GLR::dupLex(), and unlex().
|
constinit |
Definition at line 18 of file LexBase.h.
Referenced by bux::C_ScannerImpl< T_Input, T_State, T_Char, C_Traits >::add().