|
| struct | util::__either< false, X, Y > |
| | Type selector that chooses the second type when the condition is false. More...
|
| |
| struct | util::__either< true, X, Y > |
| | Type selector that chooses the first type when the condition is true. More...
|
| |
| struct | util::__false_v< T, std::enable_if_t< instantiation_of_v< std::optional, T > > > |
| | Helper specialization for optional values. More...
|
| |
| struct | util::__false_v< T, std::enable_if_t< is_pointer_v< T > > > |
| | Enables an overload only when the provided type is a pointer. More...
|
| |
| struct | util::__false_v< T, std::enable_if_t< std::is_same_v< T, bool > > > |
| | Type trait comparing a value with a boolean template argument. More...
|
| |
| struct | util::__instantiation_of< X, Y > |
| |
| struct | util::__instantiation_of< X, X< Y... > > |
| |
| struct | argument_type< T(U)> |
| | Extracts the argument type from a single-argument function signature. More...
|
| |
| class | util::buffer_t< T > |
| | Owning contiguous buffer with an explicit logical element count. More...
|
| |
| struct | util::Destroy< T, ReturnType, function > |
| | Deleter adapter that destroys the wrapped pointer. More...
|
| |
| class | util::Either< X, Y > |
| | Tagged storage for one of two possible value types. More...
|
| |
| struct | util::endian::endian_helper< T, S > |
| |
| struct | util::endian::endian_helper< T, std::enable_if_t< instantiation_of_v< std::optional, T > > > |
| | Helper specialization for optional values. More...
|
| |
| struct | util::endian::endian_helper< T, std::enable_if_t<!(instantiation_of_v< std::optional, T >)> > |
| | Helper specialization for optional values. More...
|
| |
| struct | util::endian::endianness< T > |
| | Describes the byte order used when serializing values. More...
|
| |
| class | util::FailGuard< T > |
| | Scope guard that runs a cleanup action unless it is disabled. More...
|
| |
| struct | util::Function< ReturnType, Args > |
| | Callable wrapper used by utility metaprogramming helpers. More...
|
| |
| class | util::hash< T > |
| | Hash functor that hashes the raw bytes of trivially-copyable values. More...
|
| |
| class | util::Hex< T > |
| | Formatter that exposes a value's bytes as hexadecimal text. More...
|
| |
| struct | util::overloaded< Ts > |
| |
| struct | util::point_t |
| | Two-dimensional integer point. More...
|
| |
| class | util::uniq_ptr< T, D > |
| | Unique pointer wrapper with customizable pointer and deleter types. More...
|
| |
| class | util::wrap_ptr< T > |
| | Pointer wrapper that may borrow or own the pointee. More...
|
| |
|
| #define | KITTY_DECL_CONSTR(x) |
| | Declare the standard move operations and out-of-line default constructor for a type.
|
| |
| #define | KITTY_DEFAULT_CONSTR(x) |
| | Declare defaulted copy and move operations for a value type.
|
| |
| #define | KITTY_DEFAULT_CONSTR_MOVE(x) |
| | Declare defaulted noexcept move construction and assignment for a type.
|
| |
| #define | KITTY_DEFAULT_CONSTR_MOVE_THROW(x) |
| | Declare defaulted move construction and assignment that may throw.
|
| |
|
#define | KITTY_USING_MOVE_T(move_t, t, init_val, z) |
| | Define a move-only RAII wrapper with caller-provided initial value and destructor body.
|
| |
| #define | KITTY_WHILE_LOOP(x, y, z) |
| | Execute an initializer followed by a while loop body without leaking helper names.
|
| |
| #define | TUPLE_2D(a, b, expr) |
| | Evaluate an expression returning a 2-tuple and bind both elements to local references.
|
| |
| #define | TUPLE_2D_REF(a, b, expr) |
| | Bind both elements of an existing 2-tuple expression to local references.
|
| |
| #define | TUPLE_3D(a, b, c, expr) |
| | Evaluate an expression returning a 3-tuple and bind all elements to local references.
|
| |
| #define | TUPLE_3D_REF(a, b, c, expr) |
| | Bind all elements of an existing 3-tuple expression to local references.
|
| |
| #define | TUPLE_EL(a, b, expr) |
| | Evaluate a tuple expression and bind one selected element to a local reference.
|
| |
| #define | TUPLE_EL_REF(a, b, expr) |
| | Bind one selected element of an existing tuple expression to a local reference.
|
| |
|
|
template<class T > |
| using | util::c_ptr = safe_ptr<T, c_free<T>> |
| | Safe pointer wrapper for memory released by std::free.
|
| |
|
template<class T , void(**)(T *) function> |
| using | util::dyn_safe_ptr = safe_ptr<T, dynamic<T, void, function>> |
| | Unique pointer using a runtime-provided destroy function.
|
| |
|
template<class T , class ReturnType , ReturnType(**)(T *) function> |
| using | util::dyn_safe_ptr_v2 = safe_ptr<T, dynamic<T, ReturnType, function>> |
| | Safe pointer wrapper for runtime-resolved release functions with status returns.
|
| |
|
template<bool V, class X , class Y > |
| using | util::either_t = typename __either<V, X, Y>::type |
| | Compile-time selector for one of two types.
|
| |
| template<class T > |
| using | util::optional_t |
| | Optional trait value used by endian serialization helpers.
|
| |
|
template<class T , typename Function< void, T * >::type function> |
| using | util::safe_ptr = uniq_ptr<T, Destroy<T *, void, function>> |
| | Unique pointer using a compile-time C-style destroy function.
|
| |
|
template<class T , class ReturnType , typename Function< ReturnType, T * >::type function> |
| using | util::safe_ptr_v2 = uniq_ptr<T, Destroy<T *, ReturnType, function>> |
| | Safe pointer wrapper for APIs whose release function returns a status value.
|
| |
|
template<class P > |
| using | util::shared_t = std::shared_ptr<typename P::element_type> |
| | Shared pointer type matching a safe pointer wrapper's element type.
|
| |
|
| template<class T > |
| void | util::append_struct (std::vector< uint8_t > &buf, const T &_struct) |
| | Append the raw bytes of a trivially-copyable structure to a byte buffer.
|
| |
| template<class T > |
| auto | util::endian::big (T x) |
| | Convert a value to or from big-endian byte order.
|
| |
| template<class T > |
| void | util::c_free (T *p) |
| | Release memory allocated by C APIs with free.
|
| |
| template<class T , class ReturnType , ReturnType(**)(T *) function> |
| void | util::dynamic (T *p) |
| | Create a non-owning dynamic buffer view over contiguous memory.
|
| |
| template<class T > |
| T | util::either (std::optional< T > &&l, T &&r) |
| | Build an either value from a left-hand value.
|
| |
| template<class T > |
| auto | util::enm (const T &val) -> const std::underlying_type_t< T > & |
| | Convert between enum values and their string names.
|
| |
| template<class T > |
| auto | util::enm (T &val) -> std::underlying_type_t< T > & |
| | Convert between enum values and their string names.
|
| |
| template<class T > |
| auto | util::fail_guard (T &&f) |
| | Create a scope guard that runs unless it is disabled.
|
| |
| std::int64_t | util::from_chars (const char *begin, const char *end) |
| | Convert from chars.
|
| |
| template<class T > |
| T | util::from_hex (const std::string_view &hex, bool rev=false) |
| | Convert from hex.
|
| |
| std::string | util::from_hex_vec (const std::string &hex, bool rev=false) |
| | Convert from hex vec.
|
| |
| std::int64_t | util::from_view (const std::string_view &number) |
| | Convert from view.
|
| |
| template<class T > |
| Hex< T > | util::hex (const T &elem, bool rev=false) |
| | Serialize an element as hexadecimal text.
|
| |
| template<class C > |
| std::string | util::hex_vec (C &&c, bool rev=false) |
| | Parse hexadecimal text into a byte vector.
|
| |
| template<class It > |
| std::string | util::hex_vec (It begin, It end, bool rev=false) |
| | Convert a value to a vector of hexadecimal bytes.
|
| |
| template<class T > |
| auto | util::endian::little (T x) |
| | Convert a value to or from little-endian byte order.
|
| |
| template<typename T > |
| std::string | util::log_hex (const T &value) |
| | Format a value as hexadecimal text for logging.
|
| |
| template<class P , class T > |
| shared_t< P > | util::make_shared (T *pointer) |
| | Create a shared object or message.
|
| |
| template<class T1 , class D1 , class T2 , class D2 > |
| bool | util::operator!= (const std::unique_ptr< T1, D1 > &x, const uniq_ptr< T2, D2 > &y) |
| | Compare a standard unique pointer with a Sunshine unique pointer.
|
| |
| template<class T , class D > |
| bool | util::operator!= (const uniq_ptr< T, D > &x, std::nullptr_t) |
| | Compare a Sunshine unique pointer with null.
|
| |
| template<class T1 , class D1 , class T2 , class D2 > |
| bool | util::operator!= (const uniq_ptr< T1, D1 > &x, const std::unique_ptr< T1, D1 > &y) |
| | Compare a Sunshine unique pointer with a standard unique pointer.
|
| |
| template<class T1 , class D1 , class T2 , class D2 > |
| bool | util::operator!= (const uniq_ptr< T1, D1 > &x, const uniq_ptr< T2, D2 > &y) |
| | Compare two Sunshine unique pointers by their stored addresses.
|
| |
| template<class T , class D > |
| bool | util::operator!= (std::nullptr_t, const uniq_ptr< T, D > &y) |
| | Compare null with a Sunshine unique pointer.
|
| |
| template<class T1 , class D1 , class T2 , class D2 > |
| bool | util::operator== (const std::unique_ptr< T1, D1 > &x, const uniq_ptr< T2, D2 > &y) |
| | Compare a standard unique pointer with a Sunshine unique pointer.
|
| |
| template<class T , class D > |
| bool | util::operator== (const uniq_ptr< T, D > &x, std::nullptr_t) |
| | Compare a Sunshine unique pointer with null.
|
| |
| template<class T1 , class D1 , class T2 , class D2 > |
| bool | util::operator== (const uniq_ptr< T1, D1 > &x, const std::unique_ptr< T1, D1 > &y) |
| | Compare a Sunshine unique pointer with a standard unique pointer.
|
| |
| template<class T1 , class D1 , class T2 , class D2 > |
| bool | util::operator== (const uniq_ptr< T1, D1 > &x, const uniq_ptr< T2, D2 > &y) |
| | Compare two Sunshine unique pointers by their stored addresses.
|
| |
| template<class T , class D > |
| bool | util::operator== (std::nullptr_t, const uniq_ptr< T, D > &y) |
| | Compare null with a Sunshine unique pointer.
|
| |
|
template<class... Ts> |
| | util::overloaded (Ts...) -> overloaded< Ts... > |
| | Combine multiple callables into one overload set for std::visit.
|
| |
| template<class T > |
| std::string_view | util::view (const T &data) |
| | Read the current value without removing it from the queue.
|
| |
| template<class It > |
| std::string_view | util::view (It begin, It end) |
| | Read the current value without removing it from the queue.
|
| |
Declarations for utility functions.