Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Namespaces | |
impl | |
Classes | |
class | call_on_release |
Call on release allows the user to pass a function to be called at destruction of this instance. More... | |
struct | callocator |
A simple allocator using POSIX C functions: ::malloc() , ::free() and ::realloc() . More... | |
class | CaptureInvocationFunc |
class | ClassInvocationFunc |
struct | counting_allocator |
Performance counter std::allocator specialization. More... | |
struct | counting_callocator |
Performance counter jau::callocator specialization. More... | |
class | cow_darray |
Implementation of a Copy-On-Write (CoW) using jau::darray as the underlying storage, exposing lock-free read operations using SC-DRF atomic synchronization. More... | |
class | cow_ro_iterator |
Implementation of a Copy-On-Write (CoW) read-onlu iterator over immutable value_type storage. More... | |
class | cow_rw_iterator |
Implementation of a Copy-On-Write (CoW) read-write iterator over mutable value_type storage. More... | |
class | cow_vector |
Implementation of a Copy-On-Write (CoW) using std::vector as the underlying storage, exposing lock-free read operations using SC-DRF atomic synchronization. More... | |
class | darray |
Implementation of a dynamic linear array storage, aka vector. More... | |
class | environment |
Main jau environment class, supporting environment variable access and fetching elapsed time using its stored startup-time. More... | |
class | FunctionDef |
struct | has_builtin_bit_cast |
Convenience type trait for __has_builtin(__builtin_bit_cast) . More... | |
struct | has_endian_big |
A big-endian type trait for convenience . More... | |
struct | has_endian_little |
A little-endian type trait for convenience . More... | |
struct | has_member_of_pointer |
Checker for member of pointer '->' operator with convertible pointer return, no arguments. More... | |
class | IllegalArgumentException |
class | IllegalStateException |
class | IndexOutOfBoundsException |
class | InternalError |
class | InvocationFunc |
One goal to produce the member-function type instance is to be class type agnostic for storing in the toolkit. More... | |
struct | is_cow_type |
template< class T > is_cow_type<T>::value compile-time Type Trait, determining whether the given template class is a CoW type, e.g. More... | |
struct | is_cow_type< T, std::void_t< typename T::cow_container_t > > |
template< class T > is_cow_type<T>::value compile-time Type Trait, determining whether the given template class is a CoW type, e.g. More... | |
struct | is_darray_type |
template< class T > is_darray_type<T>::value compile-time Type Trait, determining whether the given template class is a - or has a darray type, e.g. More... | |
struct | is_darray_type< T, std::void_t< typename T::darray_tag > > |
template< class T > is_darray_type<T>::value compile-time Type Trait, determining whether the given template class is a - or has a darray type, e.g. More... | |
class | JavaAnon |
Pure virtual JavaAnon, hiding Java JNI details from API, to be implemented by JNI module. More... | |
class | JavaGlobalObj |
Implementation for JavaAnon, by simply wrapping a JNIGlobalRef instance. More... | |
class | JavaUplink |
Sharing the anonymous Java object (JavaAnon), i.e. More... | |
class | NullInvocationFunc |
class | NullPointerException |
struct | ordered_atomic |
std::atomic<T> type with predefined fixed std::memory_order, not allowing changing the memory model on usage and applying the set order to all operator. More... | |
class | OutOfMemoryError |
struct | packed_t |
Safe access to a pointer cast from unaligned memory via packed attribute, i.e. More... | |
class | PlainInvocationFunc |
class | ringbuffer |
Ring buffer implementation, a.k.a circular buffer, exposing lock-free get*(..) and put*(..) methods. More... | |
class | root_environment |
Base jau environment class, merely to tag all environment settings by inheritance and hence documentation. More... | |
class | RuntimeException |
class | sc_atomic_critical |
This class provides a RAII-style Sequentially Consistent (SC) data race free (DRF) critical block. More... | |
class | StdInvocationFunc |
struct | type_cue |
Helper, allowing simple access to compile time typename and Type traits information, see jau::type_name_cue to setup typename's string representation. More... | |
struct | type_name_cue |
Helper, allowing simple access and provision of a typename string representation at compile time, see jau::type_cue for usage. More... | |
struct | uint128_t |
struct | uint192_t |
struct | uint256_t |
class | UnsupportedOperationException |
Typedefs | |
typedef uint_fast32_t | nsize_t |
Natural 'size_t' alternative using uint_fast32_t as its natural sized type. More... | |
typedef int_fast32_t | snsize_t |
Natural 'ssize_t' alternative using int_fast32_t as its natural sized type. More... | |
typedef ordered_atomic< bool, std::memory_order::memory_order_seq_cst > | sc_atomic_bool |
SC atomic integral scalar boolean. More... | |
typedef ordered_atomic< bool, std::memory_order::memory_order_relaxed > | relaxed_atomic_bool |
Relaxed non-SC atomic integral scalar boolean. More... | |
typedef ordered_atomic< int8_t, std::memory_order::memory_order_seq_cst > | sc_atomic_int8 |
SC atomic integral scalar int8_t. More... | |
typedef ordered_atomic< int8_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_int8 |
Relaxed non-SC atomic integral scalar int8_t. More... | |
typedef ordered_atomic< uint8_t, std::memory_order::memory_order_seq_cst > | sc_atomic_uint8 |
SC atomic integral scalar uint8_t. More... | |
typedef ordered_atomic< uint8_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_uint8 |
Relaxed non-SC atomic integral scalar uint8_t. More... | |
typedef ordered_atomic< int16_t, std::memory_order::memory_order_seq_cst > | sc_atomic_int16 |
SC atomic integral scalar int16_t. More... | |
typedef ordered_atomic< int16_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_int16 |
Relaxed non-SC atomic integral scalar int16_t. More... | |
typedef ordered_atomic< uint16_t, std::memory_order::memory_order_seq_cst > | sc_atomic_uint16 |
SC atomic integral scalar uint16_t. More... | |
typedef ordered_atomic< uint16_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_uint16 |
Relaxed non-SC atomic integral scalar uint16_t. More... | |
typedef ordered_atomic< int, std::memory_order::memory_order_seq_cst > | sc_atomic_int |
SC atomic integral scalar integer. More... | |
typedef ordered_atomic< int, std::memory_order::memory_order_relaxed > | relaxed_atomic_int |
Relaxed non-SC atomic integral scalar integer. More... | |
typedef ordered_atomic< int32_t, std::memory_order::memory_order_seq_cst > | sc_atomic_int32 |
SC atomic integral scalar int32_t. More... | |
typedef ordered_atomic< int32_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_int32 |
Relaxed non-SC atomic integral scalar int32_t. More... | |
typedef ordered_atomic< uint32_t, std::memory_order::memory_order_seq_cst > | sc_atomic_uint32 |
SC atomic integral scalar uint32_t. More... | |
typedef ordered_atomic< uint32_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_uint32 |
Relaxed non-SC atomic integral scalar uint32_t. More... | |
typedef ordered_atomic< jau::nsize_t, std::memory_order::memory_order_seq_cst > | sc_atomic_nsize_t |
SC atomic integral scalar jau::nsize_t. More... | |
typedef ordered_atomic< jau::snsize_t, std::memory_order::memory_order_seq_cst > | sc_atomic_snsize_t |
SC atomic integral scalar jau::snsize_t. More... | |
typedef ordered_atomic< jau::nsize_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_nsize_t |
Relaxed non-SC atomic integral scalar jau::nsize_t. More... | |
typedef ordered_atomic< jau::snsize_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_snsize_t |
Relaxed non-SC atomic integral scalar jau::snsize_t. More... | |
typedef ordered_atomic< std::size_t, std::memory_order::memory_order_seq_cst > | sc_atomic_size_t |
SC atomic integral scalar size_t. More... | |
typedef jau::ordered_atomic< ssize_t, std::memory_order::memory_order_seq_cst > | sc_atomic_ssize_t |
SC atomic integral scalar ssize_t. More... | |
typedef ordered_atomic< std::size_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_size_t |
Relaxed non-SC atomic integral scalar size_t. More... | |
typedef ordered_atomic< ssize_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_ssize_t |
Relaxed non-SC atomic integral scalar ssize_t. More... | |
typedef ordered_atomic< int64_t, std::memory_order::memory_order_seq_cst > | sc_atomic_int64 |
SC atomic integral scalar int64_t. More... | |
typedef ordered_atomic< int64_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_int64 |
Relaxed non-SC atomic integral scalar int64_t. More... | |
typedef ordered_atomic< uint64_t, std::memory_order::memory_order_seq_cst > | sc_atomic_uint64 |
SC atomic integral scalar uint64_t. More... | |
typedef ordered_atomic< uint64_t, std::memory_order::memory_order_relaxed > | relaxed_atomic_uint64 |
Relaxed non-SC atomic integral scalar uint64_t. More... | |
Enumerations | |
enum | endian : uint32_t { endian::little = 0x41424344U, endian::big = 0x44434241U, endian::pdp = 0x43444142U, endian::honeywell = 0x42414443U, endian::undefined = 0x00000000U, endian::native = impl::get_host_order() } |
Endian identifier, indicating endianess of all scaler types. More... | |
enum | TypeTraitGroup : uint8_t { TypeTraitGroup::NONE = 0b00000000, TypeTraitGroup::PRIMARY_TYPE_CAT = 0b00000001, TypeTraitGroup::TYPE_PROPERTIES = 0b00000010, TypeTraitGroup::COMPOSITE_TYPE_CAT = 0b00000100, TypeTraitGroup::SUPPORTED_OPERATIONS = 0b00001000, TypeTraitGroup::ALL = 0b11111111 } |
Enumerating the different groups of type traits. More... | |
Functions | |
template<class InputIt , class T > | |
constexpr InputIt | find (InputIt first, InputIt last, const T &value) |
Like std::find() of 'algorithm'. More... | |
template<class InputIt , class UnaryPredicate > | |
constexpr InputIt | find_if (InputIt first, InputIt last, UnaryPredicate p) |
Like std::find_if() of 'algorithm'. More... | |
template<class InputIt , class UnaryPredicate > | |
constexpr InputIt | find_if_not (InputIt first, InputIt last, UnaryPredicate q) |
Like std::find_if_not() of 'algorithm'. More... | |
template<class InputIt , class UnaryFunction > | |
constexpr UnaryFunction | for_each (InputIt first, InputIt last, UnaryFunction f) |
Like std::for_each() of 'algorithm'. More... | |
template<class InputIt , class UnaryFunction > | |
constexpr UnaryFunction | for_each_fidelity (InputIt first, InputIt last, UnaryFunction f) |
Like jau::for_each(), see above. More... | |
template<class Mutex , class InputIt , class UnaryFunction > | |
constexpr UnaryFunction | for_each_mtx (Mutex &mtx, InputIt first, InputIt last, UnaryFunction f) |
Custom for_each template, same as jau::for_each but using a mutex. More... | |
template<class InputArray , class UnaryFunction > | |
constexpr UnaryFunction | for_each_idx (InputArray &array, UnaryFunction f) |
Custom for_each template, using indices instead of iterators, allowing container to be modified within lambda 'callback'. More... | |
template<class Mutex , class InputArray , class UnaryFunction > | |
constexpr UnaryFunction | for_each_idx_mtx (Mutex &mtx, InputArray &array, UnaryFunction f) |
Custom for_each template, same as jau::for_each but using indices instead of iterators and a mutex. More... | |
template<class T > | |
const T::value_type * | find_const (T &data, typename T::value_type const &elem, std::enable_if_t< is_cow_type< T >::value, bool >=true) noexcept |
template<class T > | |
const T::value_type * | find_const (T &data, typename T::value_type const &elem, std::enable_if_t< !is_cow_type< T >::value, bool >=true) noexcept |
template<class T , class UnaryFunction > | |
constexpr UnaryFunction | for_each_const (T &data, UnaryFunction f, std::enable_if_t< is_cow_type< T >::value, bool >=true) noexcept |
template<class T , class UnaryFunction > | |
constexpr UnaryFunction | for_each_const (T &data, UnaryFunction f, std::enable_if_t< !is_cow_type< T >::value, bool >=true) noexcept |
template<class T , class UnaryFunction > | |
constexpr UnaryFunction | for_each_fidelity (T &data, UnaryFunction f, std::enable_if_t< is_cow_type< T >::value, bool >=true) noexcept |
See jau::for_each_fidelity() More... | |
template<class T , class UnaryFunction > | |
constexpr UnaryFunction | for_each_fidelity (T &data, UnaryFunction f, std::enable_if_t< !is_cow_type< T >::value, bool >=true) noexcept |
See jau::for_each_fidelity() More... | |
uint64_t | getCurrentMilliseconds () noexcept |
Returns current monotonic time in milliseconds. More... | |
uint64_t | getWallClockSeconds () noexcept |
Returns current wall-clock system time of day in seconds since Unix Epoch 00:00:00 UTC on 1 January 1970 . More... | |
void | set_bit_uint32 (const uint8_t nr, uint32_t &mask) |
void | clear_bit_uint32 (const uint8_t nr, uint32_t &mask) |
uint32_t | test_bit_uint32 (const uint8_t nr, const uint32_t mask) |
void | set_bit_uint64 (const uint8_t nr, uint64_t &mask) |
void | clear_bit_uint64 (const uint8_t nr, uint64_t &mask) |
uint64_t | test_bit_uint64 (const uint8_t nr, const uint64_t mask) |
uint128_t | merge_uint128 (uint16_t const uuid16, uint128_t const &base_uuid, nsize_t const uuid16_le_octet_index) |
Merge the given 'uuid16' into a 'base_uuid' copy at the given little endian 'uuid16_le_octet_index' position. More... | |
uint128_t | merge_uint128 (uint32_t const uuid32, uint128_t const &base_uuid, nsize_t const uuid32_le_octet_index) |
Merge the given 'uuid32' into a 'base_uuid' copy at the given little endian 'uuid32_le_octet_index' position. More... | |
constexpr uint16_t | bswap (uint16_t const source) noexcept |
constexpr uint32_t | bswap (uint32_t const source) noexcept |
constexpr uint64_t | bswap (uint64_t const &source) noexcept |
constexpr uint128_t | bswap (uint128_t const &source) noexcept |
constexpr uint192_t | bswap (uint192_t const &source) noexcept |
constexpr uint256_t | bswap (uint256_t const &source) noexcept |
PRAGMA_DISABLE_WARNING_POP constexpr_cxx20 std::string | to_string (const endian &v) noexcept |
Return std::string representation of the given jau::endian. More... | |
constexpr bool | isDefinedEndian (const endian &v) noexcept |
Evaluates true if the given endian is defined, i.e. More... | |
constexpr bool | isLittleEndian () noexcept |
Evaluates true if platform is running in little endian mode, i.e. More... | |
constexpr bool | isBigEndian () noexcept |
Evaluates true if platform is running in big endian mode, i.e. More... | |
constexpr bool | isLittleOrBigEndian () noexcept |
Evaluates true if platform is running in little or big endian mode, i.e. More... | |
constexpr uint16_t | be_to_cpu (uint16_t const n) noexcept |
On the i386 the host byte order is Least Significant Byte first (LSB) or Little-Endian, whereas the network byte order, as used on the Internet, is Most Significant Byte first (MSB) or Big-Endian. More... | |
constexpr uint16_t | cpu_to_be (uint16_t const h) noexcept |
constexpr uint16_t | le_to_cpu (uint16_t const l) noexcept |
constexpr uint16_t | cpu_to_le (uint16_t const h) noexcept |
constexpr uint32_t | be_to_cpu (uint32_t const n) noexcept |
constexpr uint32_t | cpu_to_be (uint32_t const h) noexcept |
constexpr uint32_t | le_to_cpu (uint32_t const l) noexcept |
constexpr uint32_t | cpu_to_le (uint32_t const h) noexcept |
constexpr uint64_t | be_to_cpu (uint64_t const &n) noexcept |
constexpr uint64_t | cpu_to_be (uint64_t const &h) noexcept |
constexpr uint64_t | le_to_cpu (uint64_t const &l) noexcept |
constexpr uint64_t | cpu_to_le (uint64_t const &h) noexcept |
constexpr uint128_t | be_to_cpu (uint128_t const &n) noexcept |
constexpr uint128_t | cpu_to_be (uint128_t const &h) noexcept |
constexpr uint128_t | le_to_cpu (uint128_t const &l) noexcept |
constexpr uint128_t | cpu_to_le (uint128_t const &h) noexcept |
constexpr uint192_t | be_to_cpu (uint192_t const &n) noexcept |
constexpr uint192_t | cpu_to_be (uint192_t const &h) noexcept |
constexpr uint192_t | le_to_cpu (uint192_t const &l) noexcept |
constexpr uint192_t | cpu_to_le (uint192_t const &h) noexcept |
constexpr uint256_t | be_to_cpu (uint256_t const &n) noexcept |
constexpr uint256_t | cpu_to_be (uint256_t const &h) noexcept |
constexpr uint256_t | le_to_cpu (uint256_t const &l) noexcept |
constexpr uint256_t | cpu_to_le (uint256_t const &h) noexcept |
constexpr void | put_uint8 (uint8_t *buffer, nsize_t const byte_offset, const uint8_t v) noexcept |
constexpr uint8_t | get_uint8 (uint8_t const *buffer, nsize_t const byte_offset) noexcept |
constexpr int8_t | get_int8 (uint8_t const *buffer, nsize_t const byte_offset) noexcept |
constexpr void | put_uint16 (uint8_t *buffer, nsize_t const byte_offset, const uint16_t v) noexcept |
constexpr void | put_uint16 (uint8_t *buffer, nsize_t const byte_offset, const uint16_t v, const bool littleEndian) noexcept |
constexpr uint16_t | get_uint16 (uint8_t const *buffer, nsize_t const byte_offset) noexcept |
constexpr uint16_t | get_uint16 (uint8_t const *buffer, nsize_t const byte_offset, const bool littleEndian) noexcept |
constexpr void | put_uint32 (uint8_t *buffer, nsize_t const byte_offset, const uint32_t v) noexcept |
constexpr void | put_uint32 (uint8_t *buffer, nsize_t const byte_offset, const uint32_t v, const bool littleEndian) noexcept |
constexpr uint32_t | get_uint32 (uint8_t const *buffer, nsize_t const byte_offset) noexcept |
constexpr uint32_t | get_uint32 (uint8_t const *buffer, nsize_t const byte_offset, const bool littleEndian) noexcept |
constexpr void | put_uint64 (uint8_t *buffer, nsize_t const byte_offset, const uint64_t &v) noexcept |
constexpr void | put_uint64 (uint8_t *buffer, nsize_t const byte_offset, const uint64_t &v, const bool littleEndian) noexcept |
constexpr uint64_t | get_uint64 (uint8_t const *buffer, nsize_t const byte_offset) noexcept |
constexpr uint64_t | get_uint64 (uint8_t const *buffer, nsize_t const byte_offset, const bool littleEndian) noexcept |
constexpr void | put_uint128 (uint8_t *buffer, nsize_t const byte_offset, const uint128_t &v) noexcept |
constexpr void | put_uint128 (uint8_t *buffer, nsize_t const byte_offset, const uint128_t &v, const bool littleEndian) noexcept |
constexpr uint128_t | get_uint128 (uint8_t const *buffer, nsize_t const byte_offset) noexcept |
constexpr uint128_t | get_uint128 (uint8_t const *buffer, nsize_t const byte_offset, const bool littleEndian) noexcept |
constexpr void | put_uint192 (uint8_t *buffer, nsize_t const byte_offset, const uint192_t &v) noexcept |
constexpr void | put_uint192 (uint8_t *buffer, nsize_t const byte_offset, const uint192_t &v, const bool littleEndian) noexcept |
constexpr uint192_t | get_uint192 (uint8_t const *buffer, nsize_t const byte_offset) noexcept |
constexpr uint192_t | get_uint192 (uint8_t const *buffer, nsize_t const byte_offset, const bool littleEndian) noexcept |
constexpr void | put_uint256 (uint8_t *buffer, nsize_t const byte_offset, const uint256_t &v) noexcept |
constexpr void | put_uint256 (uint8_t *buffer, nsize_t const byte_offset, const uint256_t &v, const bool littleEndian) noexcept |
constexpr uint256_t | get_uint256 (uint8_t const *buffer, nsize_t const byte_offset) noexcept |
constexpr uint256_t | get_uint256 (uint8_t const *buffer, nsize_t const byte_offset, const bool littleEndian) noexcept |
template<typename T > | |
constexpr std::enable_if_t< std::is_standard_layout_v< T >, void > | put_value (uint8_t *buffer, nsize_t const byte_offset, const T &v) noexcept |
template<typename T > | |
constexpr std::enable_if_t< std::is_standard_layout_v< T >, void > | put_value (uint8_t *buffer, nsize_t const byte_offset, const T &v, const bool littleEndian) noexcept |
template<typename T > | |
constexpr std::enable_if_t< std::is_standard_layout_v< T >, T > | get_value (uint8_t const *buffer, nsize_t const byte_offset) noexcept |
template<typename T > | |
constexpr std::enable_if_t< std::is_standard_layout_v< T >, T > | get_value (uint8_t const *buffer, nsize_t const byte_offset, const bool littleEndian) noexcept |
template<class T1 , class T2 > | |
bool | operator== (const callocator< T1 > &lhs, const callocator< T2 > &rhs) noexcept |
template<class T1 , class T2 > | |
bool | operator!= (const callocator< T1 > &lhs, const callocator< T2 > &rhs) noexcept |
template<class T1 , class T2 > | |
bool | operator== (const counting_allocator< T1 > &lhs, const counting_allocator< T2 > &rhs) noexcept |
template<class T1 , class T2 > | |
bool | operator!= (const counting_allocator< T1 > &lhs, const counting_allocator< T2 > &rhs) noexcept |
template<class T1 , class T2 > | |
bool | operator== (const counting_callocator< T1 > &lhs, const counting_callocator< T2 > &rhs) noexcept |
template<class T1 , class T2 > | |
bool | operator!= (const counting_callocator< T1 > &lhs, const counting_callocator< T2 > &rhs) noexcept |
template<typename Value_type , typename Alloc_type > | |
std::ostream & | operator<< (std::ostream &out, const cow_darray< Value_type, Alloc_type > &c) |
template<typename Value_type , typename Alloc_type > | |
bool | operator== (const cow_darray< Value_type, Alloc_type > &rhs, const cow_darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator!= (const cow_darray< Value_type, Alloc_type > &rhs, const cow_darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator< (const cow_darray< Value_type, Alloc_type > &rhs, const cow_darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator> (const cow_darray< Value_type, Alloc_type > &rhs, const cow_darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator<= (const cow_darray< Value_type, Alloc_type > &rhs, const cow_darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator>= (const cow_darray< Value_type, Alloc_type > &rhs, const cow_darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
void | swap (cow_darray< Value_type, Alloc_type > &rhs, cow_darray< Value_type, Alloc_type > &lhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
std::ostream & | operator<< (std::ostream &out, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &c) |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
std::ostream & | operator<< (std::ostream &out, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &c) |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator== (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator!= (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator== (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator!= (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator<= (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator<= (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator< (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator< (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator>= (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator>= (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator> (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr bool | operator> (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr Storage_type::difference_type | operator- (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > | |
constexpr Storage_type::difference_type | operator- (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
template<typename Value_type , typename Alloc_type > | |
std::ostream & | operator<< (std::ostream &out, const cow_vector< Value_type, Alloc_type > &c) |
template<typename Value_type , typename Alloc_type > | |
bool | operator== (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator!= (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator< (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator> (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator<= (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator>= (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
void | swap (cow_vector< Value_type, Alloc_type > &rhs, cow_vector< Value_type, Alloc_type > &lhs) noexcept |
constexpr bool | is_builtin_bit_cast_available () noexcept |
Query whether __builtin_bit_cast(Dest_type, arg) is available, using jau::has_builtin_bit_cast. More... | |
template<class Dest , class Source > | |
constexpr std::enable_if_t< sizeof(Dest)==sizeof(Source) &&std::is_trivially_copyable_v< Dest > &&std::is_trivially_copyable_v< Source >, Dest > | bit_cast (const Source &src) noexcept |
C++20 bit_cast<>(arg) implementation for C++17. More... | |
template<class Dest , class Source > | |
constexpr std::enable_if_t< sizeof(Dest)==sizeof(Source) &&std::is_pointer_v< Source > &&std::is_pointer_v< Dest >, Dest > | pointer_cast (const Source &src) noexcept |
A constexpr pointer cast implementation for C++17, inspired by C++20 bit_cast<>(arg) . More... | |
template<typename Value_type , typename Alloc_type > | |
std::ostream & | operator<< (std::ostream &out, const darray< Value_type, Alloc_type > &c) |
template<typename Value_type , typename Alloc_type > | |
bool | operator== (const darray< Value_type, Alloc_type > &rhs, const darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator!= (const darray< Value_type, Alloc_type > &rhs, const darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator< (const darray< Value_type, Alloc_type > &rhs, const darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator> (const darray< Value_type, Alloc_type > &rhs, const darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator<= (const darray< Value_type, Alloc_type > &rhs, const darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
bool | operator>= (const darray< Value_type, Alloc_type > &rhs, const darray< Value_type, Alloc_type > &lhs) |
template<typename Value_type , typename Alloc_type > | |
void | swap (darray< Value_type, Alloc_type > &rhs, darray< Value_type, Alloc_type > &lhs) noexcept |
std::string | get_backtrace (const bool skip_anon_frames, const jau::snsize_t max_frames=-1, const jau::nsize_t skip_frames=1) noexcept |
Returns a de-mangled backtrace string separated by newline excluding this function. More... | |
void | print_backtrace (const bool skip_anon_frames, const jau::snsize_t max_frames=-1, const jau::nsize_t skip_frames=2) noexcept |
Prints the de-mangled backtrace string separated by newline excluding this function to stderr, using get_backtrace(). More... | |
void | DBG_PRINT_impl (const char *format,...) noexcept |
void | WORDY_PRINT_impl (const char *format,...) noexcept |
void | ABORT_impl (const char *func, const char *file, const int line, const char *format,...) noexcept |
Use for unconditional ::abort() call with given messages, prefix '[elapsed_time] ABORT @ file:line: '. More... | |
void | ERR_PRINTv (const char *func, const char *file, const int line, const char *format, va_list args) noexcept |
Use for unconditional error messages, prefix '[elapsed_time] Error @ file:line: '. More... | |
void | ERR_PRINT_impl (const char *prefix, const bool backtrace, const char *func, const char *file, const int line, const char *format,...) noexcept |
void | WARN_PRINTv (const char *func, const char *file, const int line, const char *format, va_list args) noexcept |
Use for unconditional warning messages, prefix '[elapsed_time] Warning @ file:line: '. More... | |
void | WARN_PRINT_impl (const char *func, const char *file, const int line, const char *format,...) noexcept |
void | INFO_PRINT (const char *format,...) noexcept |
Use for unconditional informal messages, prefix '[elapsed_time] Info: '. More... | |
void | PLAIN_PRINT (const bool printPrefix, const char *format,...) noexcept |
Use for unconditional plain messages, prefix '[elapsed_time] ' if printPrefix == true. More... | |
int | fprintf_td (FILE *stream, const char *format,...) noexcept |
Convenient fprintf() invocation, prepending the environment::getElapsedMillisecond() timestamp. More... | |
void | COND_PRINT_impl (const char *format,...) noexcept |
template<class List > | |
void | printSharedPtrList (std::string prefix, List &list) noexcept |
uint32_t | dfa_utf8_decode (uint32_t &state, uint32_t &codep, const uint32_t byte_value) |
std::string | dfa_utf8_decode (const uint8_t *buffer, const size_t buffer_size) |
Returns all valid consecutive UTF-8 characters within buffer in the range up to buffer_size or until EOS. More... | |
template<class T > | |
bool | in_range (const T &a, const T &b, const T &delta) |
Returns true, if both integer point values differ less than the given delta. More... | |
template<class T > | |
std::enable_if<!std::numeric_limits< T >::is_integer, T >::type | machineEpsilon () |
Calculates the smallest floating point value approximation the given type T can represent, the machine epsilon of T. More... | |
template<class T > | |
std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type | machine_equal (const T &a, const T &b, int ulp=1, const T &epsilon=std::numeric_limits< T >::epsilon()) |
Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * ulp . More... | |
template<class T > | |
std::enable_if<!std::numeric_limits< T >::is_integer, bool >::type | almost_equal (const T &a, const T &b, int ulp=1, const T &epsilon=std::numeric_limits< T >::epsilon()) |
Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * |a+b| * ulp , where |a+b| scales epsilon to the magnitude of used values. More... | |
template<typename R , typename C , typename... A> | |
jau::FunctionDef< R, A... > | bindMemberFunc (C *base, R(C::*mfunc)(A...)) noexcept |
template<typename R , typename... A> | |
jau::FunctionDef< R, A... > | bindPlainFunc (R(*func)(A...)) noexcept |
template<typename R , typename I , typename... A> | |
jau::FunctionDef< R, A... > | bindCaptureFunc (const I &data, R(*func)(I &, A...), bool dataIsIdentity=true) noexcept |
const I& data will be copied into the InvocationFunc<..> specialization and hence captured by copy. More... | |
template<typename R , typename I , typename... A> | |
jau::FunctionDef< R, A... > | bindCaptureFunc (I &&data, R(*func)(I &, A...), bool dataIsIdentity=true) noexcept |
I&& data will be moved into the InvocationFunc<..> specialization. More... | |
template<typename R , typename... A> | |
jau::FunctionDef< R, A... > | bindStdFunc (uint64_t id, std::function< R(A...)> func) noexcept |
template<typename R , typename... A> | |
jau::FunctionDef< R, A... > | bindStdFunc (uint64_t id) noexcept |
template<typename T > | |
constexpr snsize_t | sign (const T x) noexcept |
Returns the value of the sign function. More... | |
template<typename T > | |
constexpr T | invert_sign (const T x) noexcept |
Safely inverts the sign of an integral number. More... | |
template<typename T > | |
constexpr T | abs (const T x) noexcept |
Returns the absolute value of an integral number. More... | |
template<typename T > | |
constexpr nsize_t | digits10 (const T x, const snsize_t x_sign, const bool sign_is_digit=true) noexcept |
Returns the number of decimal digits of the given integral value number using std::log10<T>(). More... | |
template<typename T > | |
constexpr nsize_t | digits10 (const T x, const bool sign_is_digit=true) noexcept |
Returns the number of decimal digits of the given integral value number using std::log10<T>(). More... | |
bool | java_exception_check (JNIEnv *env, const char *file, int line) |
Return true if a java exception occurred, otherwise false. More... | |
void | java_exception_check_and_throw (JNIEnv *env, const char *file, int line) |
Throws a C++ exception if a java exception occurred, otherwise do nothing. More... | |
void | print_native_caught_exception_fwd2java (const std::exception &e, const char *file, int line) |
void | print_native_caught_exception_fwd2java (const std::string &msg, const char *file, int line) |
void | print_native_caught_exception_fwd2java (const char *cmsg, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const std::exception &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const std::runtime_error &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const jau::RuntimeException &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const jau::InternalError &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const jau::NullPointerException &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const jau::IllegalArgumentException &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const std::invalid_argument &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const jau::IllegalStateException &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const jau::UnsupportedOperationException &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const jau::IndexOutOfBoundsException &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const std::bad_alloc &e, const char *file, int line) |
void | raise_java_exception (JNIEnv *env, const jau::OutOfMemoryError &e, const char *file, int line) |
void | rethrow_and_raise_java_exception_jauimpl (JNIEnv *env, const char *file, int line) |
Re-throw current exception and raise respective java exception using any matching function above. More... | |
jfieldID | getField (JNIEnv *env, jobject obj, const char *field_name, const char *field_signature) |
jfieldID | getInstanceField (JNIEnv *env, jobject obj) |
jclass | search_class (JNIEnv *env, const char *clazz_name) |
jclass | search_class (JNIEnv *env, jobject obj) |
jclass | search_class (JNIEnv *env, JavaUplink &object) |
jmethodID | search_method (JNIEnv *env, jclass clazz, const char *method_name, const char *prototype, bool is_static) |
jfieldID | search_field (JNIEnv *env, jclass clazz, const char *field_name, const char *type, bool is_static) |
bool | from_jboolean_to_bool (jboolean val) |
std::string | from_jstring_to_string (JNIEnv *env, jstring str) |
jstring | from_string_to_jstring (JNIEnv *env, const std::string &str) |
jobject | get_new_arraylist (JNIEnv *env, jsize size, jmethodID *add) |
template<typename T > | |
T * | getJavaUplinkObject (JNIEnv *env, jobject obj) |
template<typename T > | |
T * | getJavaUplinkObjectUnchecked (JNIEnv *env, jobject obj) |
template<typename T > | |
void | setJavaUplinkObject (JNIEnv *env, jobject obj, T *t) |
template<typename T > | |
T * | castInstance (jlong instance) |
template<typename T > | |
T * | getObjectRef (JNIEnv *env, jobject obj, const char *field_name) |
template<typename T > | |
void | setObjectRef (JNIEnv *env, jobject obj, T *t, const char *field_name) |
template<typename T > | |
T * | getInstance (JNIEnv *env, jobject obj) |
template<typename T > | |
T * | getInstanceUnchecked (JNIEnv *env, jobject obj) |
template<typename T > | |
void | setInstance (JNIEnv *env, jobject obj, T *t) |
void | clearInstance (JNIEnv *env, jobject obj) |
template<typename T > | |
jobject | generic_clone (JNIEnv *env, jobject obj) |
template<typename T > | |
jobject | convert_instance_to_jobject (JNIEnv *env, T *elem, const char *ctor_prototype, std::function< jobject(JNIEnv *, jclass, jmethodID, T *)> ctor) |
template<typename T > | |
jobject | convert_vector_sharedptr_to_jarraylist (JNIEnv *env, T &array) |
template<typename T , typename U > | |
jobject | convert_vector_uniqueptr_to_jarraylist (JNIEnv *env, T &array, const char *ctor_prototype) |
template<typename T , typename U > | |
jobject | convert_vector_uniqueptr_to_jarraylist (JNIEnv *env, T &array, const char *ctor_prototype, std::function< jobject(JNIEnv *, jclass, jmethodID, U *)> ctor) |
template<typename T , typename U > | |
jobject | convert_vector_sharedptr_to_jarraylist (JNIEnv *env, T &array, const char *ctor_prototype, std::function< jobject(JNIEnv *, jclass, jmethodID, U *)> ctor) |
std::string | get_string (const uint8_t *buffer, nsize_t const buffer_len, nsize_t const max_len) noexcept |
Returns a C++ String taken from buffer with maximum length of min(max_len, max_len). More... | |
void | trimInPlace (std::string &s) noexcept |
trim in place More... | |
std::string | trimCopy (const std::string &s) noexcept |
trim copy More... | |
std::string | bytesHexString (const uint8_t *bytes, const nsize_t offset, const nsize_t length, const bool lsbFirst, const bool lowerCase=true) noexcept |
Produce a hexadecimal string representation of the given byte values. More... | |
std::string & | byteHexString (std::string &dest, const uint8_t value, const bool lowerCase) noexcept |
Produce a hexadecimal string representation of the given byte value. More... | |
template<class value_type , std::enable_if_t< std::is_pointer_v< value_type >, bool > = true> | |
std::string | to_hexstring (value_type const &v) noexcept |
Produce a lower-case hexadecimal string representation of the given pointer. More... | |
template<class value_type , std::enable_if_t< std::is_integral_v< value_type >, bool > = true> | |
std::string | to_decstring (const value_type &v, const char separator=',', const nsize_t width=0) noexcept |
Produce a decimal string representation of an integral integer value. More... | |
template<class value_type , std::enable_if_t< std::is_integral_v< value_type >||std::is_floating_point_v< value_type >, bool > = true> | |
std::string | to_string (const value_type &ref) |
constexpr uint8_t | number (const TypeTraitGroup rhs) noexcept |
constexpr TypeTraitGroup | operator^ (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
constexpr TypeTraitGroup | operator| (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
constexpr TypeTraitGroup | operator& (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
constexpr bool | operator== (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
constexpr bool | operator!= (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
constexpr bool | isTypeTraitBitSet (const TypeTraitGroup mask, const TypeTraitGroup bit) noexcept |
Variables | |
template<typename Dummy_type > | |
constexpr bool | has_endian_little_v = has_endian_little<Dummy_type>::value |
Value access of little-endian type trait for convenience . More... | |
template<typename Dummy_type > | |
constexpr bool | has_endian_big_v = has_endian_big<Dummy_type>::value |
Value access of big-endian type trait for convenience . More... | |
template<typename Dummy_type > | |
constexpr bool | has_builtin_bit_cast_v = has_builtin_bit_cast<Dummy_type>::value |
Value access of has_builtin_bit_cast type trait for convenience . More... | |
template<typename _Tp > | |
constexpr bool | has_toString_v = has_toString<_Tp>::value |
template<typename _Tp > | |
constexpr bool | has_to_string_v = has_to_string<_Tp>::value |
template<typename _Tp > | |
constexpr bool | has_member_of_pointer_v = has_member_of_pointer<_Tp>::value |
const char * | VERSION |
const char * | VERSION_SHORT |
const char * | VERSION_API |
typedef uint_fast32_t jau::nsize_t |
Natural 'size_t' alternative using uint_fast32_t
as its natural sized type.
The leading 'n' stands for natural.
This is a compromise to indicate intend, but to avoid handling a multiple sized size_t
footprint where not desired.
Definition at line 44 of file int_types.hpp.
typedef ordered_atomic<bool, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_bool |
Relaxed non-SC atomic integral scalar boolean.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 216 of file ordered_atomic.hpp.
typedef ordered_atomic<int, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_int |
Relaxed non-SC atomic integral scalar integer.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 246 of file ordered_atomic.hpp.
typedef ordered_atomic<int16_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_int16 |
Relaxed non-SC atomic integral scalar int16_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 234 of file ordered_atomic.hpp.
typedef ordered_atomic<int32_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_int32 |
Relaxed non-SC atomic integral scalar int32_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 252 of file ordered_atomic.hpp.
typedef ordered_atomic<int64_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_int64 |
Relaxed non-SC atomic integral scalar int64_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 288 of file ordered_atomic.hpp.
typedef ordered_atomic<int8_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_int8 |
Relaxed non-SC atomic integral scalar int8_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 222 of file ordered_atomic.hpp.
typedef ordered_atomic<jau::nsize_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_nsize_t |
Relaxed non-SC atomic integral scalar jau::nsize_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 267 of file ordered_atomic.hpp.
typedef ordered_atomic<std::size_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_size_t |
Relaxed non-SC atomic integral scalar size_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 279 of file ordered_atomic.hpp.
typedef ordered_atomic<jau::snsize_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_snsize_t |
Relaxed non-SC atomic integral scalar jau::snsize_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 270 of file ordered_atomic.hpp.
typedef ordered_atomic<ssize_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_ssize_t |
Relaxed non-SC atomic integral scalar ssize_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 282 of file ordered_atomic.hpp.
typedef ordered_atomic<uint16_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_uint16 |
Relaxed non-SC atomic integral scalar uint16_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 240 of file ordered_atomic.hpp.
typedef ordered_atomic<uint32_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_uint32 |
Relaxed non-SC atomic integral scalar uint32_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 258 of file ordered_atomic.hpp.
typedef ordered_atomic<uint64_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_uint64 |
Relaxed non-SC atomic integral scalar uint64_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 294 of file ordered_atomic.hpp.
typedef ordered_atomic<uint8_t, std::memory_order::memory_order_relaxed> jau::relaxed_atomic_uint8 |
Relaxed non-SC atomic integral scalar uint8_t.
Memory-Model (MM) only guarantees the atomic value, no sequential consistency (SC) between acquire (read) and release (write).
Definition at line 228 of file ordered_atomic.hpp.
typedef ordered_atomic<bool, std::memory_order::memory_order_seq_cst> jau::sc_atomic_bool |
SC atomic integral scalar boolean.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 213 of file ordered_atomic.hpp.
typedef ordered_atomic<int, std::memory_order::memory_order_seq_cst> jau::sc_atomic_int |
SC atomic integral scalar integer.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 243 of file ordered_atomic.hpp.
typedef ordered_atomic<int16_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_int16 |
SC atomic integral scalar int16_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 231 of file ordered_atomic.hpp.
typedef ordered_atomic<int32_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_int32 |
SC atomic integral scalar int32_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 249 of file ordered_atomic.hpp.
typedef ordered_atomic<int64_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_int64 |
SC atomic integral scalar int64_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 285 of file ordered_atomic.hpp.
typedef ordered_atomic<int8_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_int8 |
SC atomic integral scalar int8_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 219 of file ordered_atomic.hpp.
typedef ordered_atomic<jau::nsize_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_nsize_t |
SC atomic integral scalar jau::nsize_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 261 of file ordered_atomic.hpp.
typedef ordered_atomic<std::size_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_size_t |
SC atomic integral scalar size_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 273 of file ordered_atomic.hpp.
typedef ordered_atomic<jau::snsize_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_snsize_t |
SC atomic integral scalar jau::snsize_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 264 of file ordered_atomic.hpp.
typedef jau::ordered_atomic<ssize_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_ssize_t |
SC atomic integral scalar ssize_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 276 of file ordered_atomic.hpp.
typedef ordered_atomic<uint16_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_uint16 |
SC atomic integral scalar uint16_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 237 of file ordered_atomic.hpp.
typedef ordered_atomic<uint32_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_uint32 |
SC atomic integral scalar uint32_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 255 of file ordered_atomic.hpp.
typedef ordered_atomic<uint64_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_uint64 |
SC atomic integral scalar uint64_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 291 of file ordered_atomic.hpp.
typedef ordered_atomic<uint8_t, std::memory_order::memory_order_seq_cst> jau::sc_atomic_uint8 |
SC atomic integral scalar uint8_t.
Memory-Model (MM) guaranteed sequential consistency (SC) between acquire (read) and release (write)
Definition at line 225 of file ordered_atomic.hpp.
typedef int_fast32_t jau::snsize_t |
Natural 'ssize_t' alternative using int_fast32_t
as its natural sized type.
The leading 'n' stands for natural.
This is a compromise to indicate intend, but to avoid handling a multiple sized ssize_t
footprint where not desired.
Definition at line 56 of file int_types.hpp.
|
strong |
Endian identifier, indicating endianess of all scaler types.
Inspired by C++20 std::endian
Corner case platforms currently not supported, i.e. unified endianess and mixed endianess.
All endian API entries are of constexpr
and hence evaluated at compile time.
Therefore, if-branches and expressions are also of constexpr
and optimized 'away' at compile time.
This includes the cpu_to_<endian>(..)
and <endian>_to_cpu(..)
etc utility functions.
Definition at line 170 of file byte_util.hpp.
|
strong |
Enumerating the different groups of type traits.
Enumerator | |
---|---|
NONE | NONE. |
PRIMARY_TYPE_CAT | PRIMARY_TYPE_CAT. |
TYPE_PROPERTIES | TYPE_PROPERTIES. |
COMPOSITE_TYPE_CAT | COMPOSITE_TYPE_CAT. |
SUPPORTED_OPERATIONS | SUPPORTED_OPERATIONS. |
ALL | ALL. |
Definition at line 45 of file type_traits_queries.hpp.
|
noexcept |
Use for unconditional ::abort() call with given messages, prefix '[elapsed_time] ABORT @ file:line: '.
Function also appends last errno and strerror(errno).
Definition at line 116 of file debug.cpp.
|
constexprnoexcept |
Returns the absolute value of an integral number.
Implementation uses jau::invert_sign() to have a safe absolute value conversion, if required.
T | an integral number type |
x | the integral number |
Definition at line 100 of file int_math.hpp.
std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type jau::almost_equal | ( | const T & | a, |
const T & | b, | ||
int | ulp = 1 , |
||
const T & | epsilon = std::numeric_limits<T>::epsilon() |
||
) |
Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * |a+b| * ulp
, where |a+b|
scales epsilon to the magnitude of used values.
T | a non integer float type |
a | value to compare |
b | value to compare |
ulp | desired precision in ULPs (units in the last place), defaults to 1 |
epsilon | the machine epsilon of type T, defaults to std::numeric_limits<T>::epsilon() |
Definition at line 102 of file float_math.hpp.
|
constexprnoexcept |
On the i386 the host byte order is Least Significant Byte first (LSB) or Little-Endian, whereas the network byte order, as used on the Internet, is Most Significant Byte first (MSB) or Big-Endian.
See #include <arpa/inet.h>
Bluetooth is LSB or Little-Endian!
Definition at line 306 of file byte_util.hpp.
|
constexprnoexcept |
|
constexprnoexcept |
|
inlinenoexcept |
const I& data
will be copied into the InvocationFunc<..> specialization and hence captured by copy.
The function call will have the reference of the copied data being passed for efficiency.
Definition at line 380 of file function_def.hpp.
|
inlinenoexcept |
I&& data
will be moved into the InvocationFunc<..> specialization.
The function call will have the reference of the copied data being passed for efficiency.
Definition at line 392 of file function_def.hpp.
|
inlinenoexcept |
Definition at line 361 of file function_def.hpp.
|
inlinenoexcept |
Definition at line 367 of file function_def.hpp.
|
inlinenoexcept |
Definition at line 403 of file function_def.hpp.
|
inlinenoexcept |
Definition at line 398 of file function_def.hpp.
|
constexprnoexcept |
C++20 bit_cast<>(arg)
implementation for C++17.
Functional if is_builtin_bit_cast_available() evaluates true
.
Dest | the target type |
Source | the source argument type |
src | the value to convert to Dest type |
Definition at line 267 of file cpp_lang_util.hpp.
Definition at line 101 of file byte_util.hpp.
|
constexprnoexcept |
Definition at line 66 of file byte_util.hpp.
Definition at line 111 of file byte_util.hpp.
Definition at line 121 of file byte_util.hpp.
|
constexprnoexcept |
Definition at line 75 of file byte_util.hpp.
|
constexprnoexcept |
Definition at line 86 of file byte_util.hpp.
|
noexcept |
Produce a hexadecimal string representation of the given byte value.
dest | the std::string reference destination to append |
value | the byte value to represent |
lowerCase | true to use lower case hex-chars, otherwise capital letters are being used. |
Definition at line 203 of file basic_types.cpp.
|
noexcept |
Produce a hexadecimal string representation of the given byte values.
If lsbFirst is true, orders LSB left -> MSB right, usual for byte streams. Result will not have a leading 0x
.
Otherwise orders MSB left -> LSB right, usual for readable integer values. Result will have a leading 0x
.
bytes | pointer to the first byte to print, less offset |
offset | offset to bytes pointer to the first byte to print |
length | number of bytes to print |
lsbFirst | true having the least significant byte printed first (lowest addressed byte to highest), otherwise have the most significant byte printed first (highest addressed byte to lowest). A leading 0x will be prepended if lsbFirst == false . |
lowerCase | true to use lower case hex-chars, otherwise capital letters are being used. |
Definition at line 167 of file basic_types.cpp.
T* jau::castInstance | ( | jlong | instance | ) |
Definition at line 242 of file helper_jni.hpp.
|
inline |
Definition at line 153 of file basic_types.hpp.
|
inline |
Definition at line 171 of file basic_types.hpp.
|
inline |
Definition at line 295 of file helper_jni.hpp.
|
noexcept |
jobject jau::convert_instance_to_jobject | ( | JNIEnv * | env, |
T * | elem, | ||
const char * | ctor_prototype, | ||
std::function< jobject(JNIEnv *, jclass, jmethodID, T *)> | ctor | ||
) |
jobject jau::convert_vector_sharedptr_to_jarraylist | ( | JNIEnv * | env, |
T & | array | ||
) |
Definition at line 339 of file helper_jni.hpp.
jobject jau::convert_vector_sharedptr_to_jarraylist | ( | JNIEnv * | env, |
T & | array, | ||
const char * | ctor_prototype, | ||
std::function< jobject(JNIEnv *, jclass, jmethodID, U *)> | ctor | ||
) |
jobject jau::convert_vector_uniqueptr_to_jarraylist | ( | JNIEnv * | env, |
T & | array, | ||
const char * | ctor_prototype | ||
) |
jobject jau::convert_vector_uniqueptr_to_jarraylist | ( | JNIEnv * | env, |
T & | array, | ||
const char * | ctor_prototype, | ||
std::function< jobject(JNIEnv *, jclass, jmethodID, U *)> | ctor | ||
) |
|
constexprnoexcept |
Definition at line 316 of file byte_util.hpp.
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
Definition at line 334 of file byte_util.hpp.
|
constexprnoexcept |
|
constexprnoexcept |
|
noexcept |
std::string jau::dfa_utf8_decode | ( | const uint8_t * | buffer, |
const size_t | buffer_size | ||
) |
Returns all valid consecutive UTF-8 characters within buffer in the range up to buffer_size or until EOS.
In case a non UTF-8 character has been detected, the content will be cut off and the decoding loop ends.
Method utilizes a finite state machine detecting variable length UTF-8 codes. See Bjoern Hoehrmann's site http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
Definition at line 31 of file dfa_utf8_decode.cpp.
uint32_t jau::dfa_utf8_decode | ( | uint32_t & | state, |
uint32_t & | codep, | ||
const uint32_t | byte_value | ||
) |
Definition at line 90 of file dfa_utf8_decode.cpp.
|
constexprnoexcept |
Returns the number of decimal digits of the given integral value number using std::log10<T>().
If sign_is_digit == true (default), treats a potential negative sign as a digit.
x < 0: 1 + (int) ( log10( -x ) ) + ( sign_is_digit ? 1 : 0 ) x = 0: 1 x > 0: 1 + (int) ( log10( x ) )
Implementation uses jau::invert_sign() to have a safe absolute value conversion, if required.
T | an integral integer type |
x | the integral integer |
sign_is_digit | if true and value is negative, adds one to result for sign. Defaults to true. |
Definition at line 151 of file int_math.hpp.
|
constexprnoexcept |
Returns the number of decimal digits of the given integral value number using std::log10<T>().
If sign_is_digit == true (default), treats a potential negative sign as a digit.
x < 0: 1 + (int) ( log10( -x ) ) + ( sign_is_digit ? 1 : 0 ) x = 0: 1 x > 0: 1 + (int) ( log10( x ) )
Implementation uses jau::invert_sign() to have a safe absolute value conversion, if required.
Convenience method, reusing precomputed sign of value to avoid redundant computations.
T | an integral integer type |
x | the integral integer |
x_sign | the pre-determined sign of the given value x |
sign_is_digit | if true and value is negative, adds one to result for sign. Defaults to true. |
Definition at line 124 of file int_math.hpp.
|
noexcept |
|
noexcept |
Use for unconditional error messages, prefix '[elapsed_time] Error @ file:line: '.
Function also appends last errno and strerror(errno).
Definition at line 128 of file debug.cpp.
|
constexpr |
Like std::find() of 'algorithm'.
Only exists here as performance analysis over O(n*n) complexity exposes std::find() to be approximately 3x slower.
See test/test_cow_darray_perf01.cpp
InputIt | the iterator type |
T | the data type |
first | range start of elements to examine |
last | range end of elements to examine, exclusive |
value | reference value for comparison |
Definition at line 88 of file basic_algos.hpp.
|
noexcept |
Definition at line 306 of file basic_algos.hpp.
|
noexcept |
Definition at line 295 of file basic_algos.hpp.
|
constexpr |
Like std::find_if() of 'algorithm'.
Only exists here as performance analysis over O(n*n) complexity exposes std::find_if() to be approximately 3x slower for 1000 x 1000.
See test/test_cow_darray_perf01.cpp
InputIt | the iterator type |
UnaryPredicate |
first | range start of elements to examine |
last | range end of elements to examine, exclusive |
p | unary predicate which returns ​true for the desired element. |
Definition at line 113 of file basic_algos.hpp.
|
constexpr |
Like std::find_if_not() of 'algorithm'.
Only exists here as performance analysis over O(n*n) complexity exposes std::find_if_not() to be approximately 3x slower for 1000 x 1000.
See test/test_cow_darray_perf01.cpp
InputIt | the iterator type |
UnaryPredicate |
first | range start of elements to examine |
last | range end of elements to examine, exclusive |
q | unary predicate which returns ​false for the desired element. |
Definition at line 138 of file basic_algos.hpp.
|
constexpr |
Like std::for_each() of 'algorithm'.
Only exists here as performance analysis over O(n*n) complexity exposes std::for_each() to be 'a little' slower for 1000 x 1000.
See test/test_cow_darray_perf01.cpp
InputIt | the iterator type |
UnaryFunction |
first | range start of elements to apply the function |
last | range end of elements to apply the function |
f | the function object, like void fun(const Type &a) |
Definition at line 163 of file basic_algos.hpp.
|
constexprnoexcept |
Definition at line 332 of file basic_algos.hpp.
|
constexprnoexcept |
Definition at line 323 of file basic_algos.hpp.
|
constexpr |
Like jau::for_each(), see above.
Additionally this template function removes the const
qualifier of the UnaryFunction
sole argument.
The latter is retrieved by dereferencing the iterator, which might expose the const
qualifier if the iterator is a const_iterator
.
Implementation casts argument in the following fashion const_cast<value_type*>(&arg)
, allowing to use const_iterator
and subsequent non-const features of the argument, see below.
Such situations may occur when preferring to use the const_iterator
over non-const.
jau::cow_darray is such a scenario, where one might not mutate the elements of the container itself but needs to invoke non-const functions in good faith.
Here we can avoid costly side-effects of copying the CoW storage for later replacement.
See jau::cow_ro_iterator and jau::cow_rw_iterator in conjunction with jau::cow_darray.
Requirements for the given IteratorIt type are to have typename InputIt::value_type
available.
InputIt | the iterator type, which might be a 'const_iterator' for non const types. |
UnaryFunction |
first | range start of elements to apply the function |
last | range end of elements to apply the function |
f | the function object, like void fun(const Type &a) |
Definition at line 215 of file basic_algos.hpp.
|
constexprnoexcept |
Definition at line 362 of file basic_algos.hpp.
|
constexprnoexcept |
Definition at line 350 of file basic_algos.hpp.
|
constexpr |
Custom for_each template, using indices instead of iterators, allowing container to be modified within lambda 'callback'.
Method performs UnaryFunction on all elements [0..n-1], where n is being retrieved once before the loop!
Definition at line 258 of file basic_algos.hpp.
|
constexpr |
Custom for_each template, same as jau::for_each but using indices instead of iterators and a mutex.
Method performs UnaryFunction on all elements [0..n-1], where n is being retrieved once before the loop!
This method also utilizes a given mutex to ensure thread-safety, by operating within an RAII-style std::lock_guard block.
Definition at line 280 of file basic_algos.hpp.
|
constexpr |
Custom for_each template, same as jau::for_each but using a mutex.
Method performs UnaryFunction on all elements [first..last).
This method also utilizes a given mutex to ensure thread-safety, by operating within an RAII-style std::lock_guard block.
Definition at line 239 of file basic_algos.hpp.
|
noexcept |
Convenient fprintf() invocation, prepending the environment::getElapsedMillisecond() timestamp.
stream | the output stream |
format | the format |
args | the optional arguments |
Definition at line 188 of file debug.cpp.
bool jau::from_jboolean_to_bool | ( | jboolean | val | ) |
std::string jau::from_jstring_to_string | ( | JNIEnv * | env, |
jstring | str | ||
) |
jstring jau::from_string_to_jstring | ( | JNIEnv * | env, |
const std::string & | str | ||
) |
jobject jau::generic_clone | ( | JNIEnv * | env, |
jobject | obj | ||
) |
|
noexcept |
Returns a de-mangled backtrace string separated by newline excluding this function.
Returns one line per stack frame, each with
skip_anon_frames | if true, skip all frames w/o proc-name |
skip_frames | number of stack frames to skip, default is one frame for this function. |
max_frames | number of stack frames to be printed or -1 for unlimited, defaults to -1 |
Definition at line 36 of file debug.cpp.
|
constexprnoexcept |
jobject jau::get_new_arraylist | ( | JNIEnv * | env, |
jsize | size, | ||
jmethodID * | add | ||
) |
|
noexcept |
Returns a C++ String taken from buffer with maximum length of min(max_len, max_len).
The maximum length only delimits the string length and does not contain the EOS null byte. An EOS null byte will will be added.
The source string within buffer is not required to contain an EOS null byte;
Definition at line 69 of file basic_types.cpp.
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
Definition at line 732 of file byte_util.hpp.
|
constexprnoexcept |
|
noexcept |
Returns current monotonic time in milliseconds.
See http://man7.org/linux/man-pages/man2/clock_gettime.2.html
Regarding avoiding kernel via VDSO, see http://man7.org/linux/man-pages/man7/vdso.7.html, clock_gettime seems to be well supported at least on kernel >= 4.4. Only bfin and sh are missing, while ia64 seems to be complicated.
Definition at line 47 of file basic_types.cpp.
jfieldID jau::getField | ( | JNIEnv * | env, |
jobject | obj, | ||
const char * | field_name, | ||
const char * | field_signature | ||
) |
T* jau::getInstance | ( | JNIEnv * | env, |
jobject | obj | ||
) |
|
inline |
Definition at line 109 of file helper_jni.hpp.
T* jau::getInstanceUnchecked | ( | JNIEnv * | env, |
jobject | obj | ||
) |
T* jau::getJavaUplinkObject | ( | JNIEnv * | env, |
jobject | obj | ||
) |
T* jau::getJavaUplinkObjectUnchecked | ( | JNIEnv * | env, |
jobject | obj | ||
) |
T* jau::getObjectRef | ( | JNIEnv * | env, |
jobject | obj, | ||
const char * | field_name | ||
) |
|
noexcept |
Returns current wall-clock system time of day
in seconds since Unix Epoch 00:00:00 UTC on 1 January 1970
.
Definition at line 54 of file basic_types.cpp.
bool jau::in_range | ( | const T & | a, |
const T & | b, | ||
const T & | delta | ||
) |
Returns true, if both integer point values differ less than the given delta.
T | an integral type |
a | value to compare |
b | value to compare |
delta | the maximum difference both values may differ |
Definition at line 47 of file float_math.hpp.
|
noexcept |
|
constexprnoexcept |
Safely inverts the sign of an integral number.
Implementation takes special care to have T_MIN, i.e. std::numeric_limits<T>::min(), converted to T_MAX, i.e. std::numeric_limits<T>::max().
This is necessary since T_MAX < | -T_MIN |
and the result would not fit in the return type T otherwise.
Hence for the extreme minimum case:
jau::invert_sign<int32_t>(INT32_MIN) = | INT32_MIN | - 1 = INT32_MAX
Otherwise with x < 0:
jau::invert_sign<int32_t>(x) = | x | = -x
and x >= 0:
jau::invert_sign<int32_t>(x) = -x
T |
x |
Definition at line 85 of file int_math.hpp.
|
constexprnoexcept |
Query whether __builtin_bit_cast(Dest_type, arg)
is available, using jau::has_builtin_bit_cast.
Availability of __builtin_bit_cast(Dest_type, arg)
Reflecting my manual platform tests using test_basictypeconv.cpp
Compiler | Version | Architecture | Available |
---|---|---|---|
GCC | 8.3.0 | amd64, arm64, arm32 | no |
GCC | 10.2.1 | amd64 | no |
clang | 9.0.1 | amd64, arm64 | yes |
clang | 11.0.1 | amd64 | yes |
true
if query subject is available, otherwise not. Definition at line 243 of file cpp_lang_util.hpp.
|
constexprnoexcept |
Evaluates true
if platform is running in big endian mode, i.e.
jau::endian::big == jau::endian::native
.
Definition at line 240 of file byte_util.hpp.
|
constexprnoexcept |
Evaluates true
if the given endian is defined, i.e.
little
, big
, pdp
or honeywell
.
Definition at line 213 of file byte_util.hpp.
|
constexprnoexcept |
Evaluates true
if platform is running in little endian mode, i.e.
jau::endian::little == jau::endian::native
.
Definition at line 232 of file byte_util.hpp.
|
constexprnoexcept |
Evaluates true
if platform is running in little or big endian mode, i.e.
jau::endian::little == jau::endian::native || jau::endian::big == jau::endian::native
.
Definition at line 248 of file byte_util.hpp.
|
constexprnoexcept |
bool jau::java_exception_check | ( | JNIEnv * | env, |
const char * | file, | ||
int | line | ||
) |
Return true if a java exception occurred, otherwise false.
In case of an exception, the information might be logged to stderr.
In case of an exception, user shall release resourced in their JNI code and leave immediately.
void jau::java_exception_check_and_throw | ( | JNIEnv * | env, |
const char * | file, | ||
int | line | ||
) |
Throws a C++ exception if a java exception occurred, otherwise do nothing.
In case of an exception, the information might be logged to stderr.
In case of an exception and hence thrown C++ exception, might want to catch all and handle it via rethrow_and_raise_java_exception(JNIEnv*).
|
constexprnoexcept |
Definition at line 325 of file byte_util.hpp.
|
constexprnoexcept |
|
constexprnoexcept |
std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type jau::machine_equal | ( | const T & | a, |
const T & | b, | ||
int | ulp = 1 , |
||
const T & | epsilon = std::numeric_limits<T>::epsilon() |
||
) |
Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * ulp
.
T | a non integer float type |
a | value to compare |
b | value to compare |
ulp | desired precision in ULPs (units in the last place), defaults to 1 |
epsilon | the machine epsilon of type T, defaults to std::numeric_limits<T>::epsilon() |
Definition at line 83 of file float_math.hpp.
std::enable_if<!std::numeric_limits<T>::is_integer, T>::type jau::machineEpsilon | ( | ) |
Calculates the smallest floating point value approximation the given type T can represent, the machine epsilon of T.
T | a non integer float type |
Definition at line 62 of file float_math.hpp.
uint128_t jau::merge_uint128 | ( | uint16_t const | uuid16, |
uint128_t const & | base_uuid, | ||
nsize_t const | uuid16_le_octet_index | ||
) |
Merge the given 'uuid16' into a 'base_uuid' copy at the given little endian 'uuid16_le_octet_index' position.
The given 'uuid16' value will be added with the 'base_uuid' copy at the given position.
base_uuid: 00000000-0000-1000-8000-00805F9B34FB uuid16: DCBA uuid16_le_octet_index: 12 result: 0000DCBA-0000-1000-8000-00805F9B34FB
LE: low-mem - FB349B5F8000-0080-0010-0000-ABCD0000 - high-mem ^ index 12 LE: uuid16 -> value.data[12+13]
BE: low-mem - 0000DCBA-0000-1000-8000-00805F9B34FB - high-mem ^ index 2 BE: uuid16 -> value.data[2+3]
Definition at line 92 of file basic_types.cpp.
uint128_t jau::merge_uint128 | ( | uint32_t const | uuid32, |
uint128_t const & | base_uuid, | ||
nsize_t const | uuid32_le_octet_index | ||
) |
Merge the given 'uuid32' into a 'base_uuid' copy at the given little endian 'uuid32_le_octet_index' position.
The given 'uuid32' value will be added with the 'base_uuid' copy at the given position.
base_uuid: 00000000-0000-1000-8000-00805F9B34FB uuid32: 87654321 uuid32_le_octet_index: 12 result: 87654321-0000-1000-8000-00805F9B34FB
LE: low-mem - FB349B5F8000-0080-0010-0000-12345678 - high-mem ^ index 12 LE: uuid32 -> value.data[12..15]
BE: low-mem - 87654321-0000-1000-8000-00805F9B34FB - high-mem ^ index 0 BE: uuid32 -> value.data[0..3]
Definition at line 128 of file basic_types.cpp.
|
constexprnoexcept |
Definition at line 53 of file type_traits_queries.hpp.
|
noexcept |
Definition at line 155 of file callocator.hpp.
|
noexcept |
Definition at line 225 of file counting_allocator.hpp.
|
noexcept |
Definition at line 240 of file counting_callocator.hpp.
|
inline |
Definition at line 1047 of file cow_darray.hpp.
|
constexprnoexcept |
Definition at line 964 of file cow_iterator.hpp.
|
constexprnoexcept |
Definition at line 974 of file cow_iterator.hpp.
|
inline |
Definition at line 670 of file cow_vector.hpp.
|
inline |
Definition at line 1173 of file darray.hpp.
|
constexprnoexcept |
Definition at line 68 of file type_traits_queries.hpp.
|
constexprnoexcept |
|
constexprnoexcept |
Definition at line 1019 of file cow_iterator.hpp.
|
constexprnoexcept |
Definition at line 1025 of file cow_iterator.hpp.
|
inline |
|
constexprnoexcept |
Definition at line 989 of file cow_iterator.hpp.
|
constexprnoexcept |
Definition at line 994 of file cow_iterator.hpp.
|
inline |
std::ostream& jau::operator<< | ( | std::ostream & | out, |
const cow_darray< Value_type, Alloc_type > & | c | ||
) |
std::ostream& jau::operator<< | ( | std::ostream & | out, |
const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > & | c | ||
) |
Definition at line 950 of file cow_iterator.hpp.
std::ostream& jau::operator<< | ( | std::ostream & | out, |
const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > & | c | ||
) |
std::ostream& jau::operator<< | ( | std::ostream & | out, |
const cow_vector< Value_type, Alloc_type > & | c | ||
) |
std::ostream& jau::operator<< | ( | std::ostream & | out, |
const darray< Value_type, Alloc_type > & | c | ||
) |
|
inline |
Definition at line 1065 of file cow_darray.hpp.
|
constexprnoexcept |
Definition at line 979 of file cow_iterator.hpp.
|
constexprnoexcept |
Definition at line 984 of file cow_iterator.hpp.
|
inline |
Definition at line 688 of file cow_vector.hpp.
|
inline |
Definition at line 1186 of file darray.hpp.
|
noexcept |
Definition at line 142 of file callocator.hpp.
|
noexcept |
Definition at line 212 of file counting_allocator.hpp.
|
noexcept |
Definition at line 227 of file counting_callocator.hpp.
|
inline |
|
constexprnoexcept |
Definition at line 959 of file cow_iterator.hpp.
|
constexprnoexcept |
Definition at line 969 of file cow_iterator.hpp.
|
inline |
|
constexprnoexcept |
|
inline |
Definition at line 1061 of file cow_darray.hpp.
|
constexprnoexcept |
Definition at line 1009 of file cow_iterator.hpp.
|
constexprnoexcept |
Definition at line 1014 of file cow_iterator.hpp.
|
inline |
Definition at line 684 of file cow_vector.hpp.
|
inline |
Definition at line 1182 of file darray.hpp.
|
inline |
Definition at line 1069 of file cow_darray.hpp.
|
constexprnoexcept |
Definition at line 999 of file cow_iterator.hpp.
|
constexprnoexcept |
Definition at line 1004 of file cow_iterator.hpp.
|
inline |
Definition at line 692 of file cow_vector.hpp.
|
inline |
Definition at line 1190 of file darray.hpp.
|
constexprnoexcept |
|
constexprnoexcept |
|
noexcept |
|
constexprnoexcept |
A constexpr
pointer cast implementation for C++17, inspired by C++20 bit_cast<>(arg)
.
If is_builtin_bit_cast_available() evaluates true
, implementation uses __builtin_bit_cast(Dest, src)
.
Otherwise a simple reinterpret_cast<Dest>(src)
is utilized, which officially is questionable to deliver a constexpr
.
Dest | the target pointer type |
Source | the source pointer argument type |
src | the pointer to convert to Dest pointer type |
Definition at line 302 of file cpp_lang_util.hpp.
|
noexcept |
Prints the de-mangled backtrace string separated by newline excluding this function to stderr, using get_backtrace().
skip_anon_frames | if true, skip all frames w/o proc-name |
max_frames | number of stack frames to be printed or -1 for unlimited, defaults to -1 |
skip_frames | number of stack frames to skip, default is two frames for this function and for get_backtrace(). |
Definition at line 91 of file debug.cpp.
void jau::print_native_caught_exception_fwd2java | ( | const char * | cmsg, |
const char * | file, | ||
int | line | ||
) |
void jau::print_native_caught_exception_fwd2java | ( | const std::exception & | e, |
const char * | file, | ||
int | line | ||
) |
void jau::print_native_caught_exception_fwd2java | ( | const std::string & | msg, |
const char * | file, | ||
int | line | ||
) |
|
inlinenoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |
Definition at line 536 of file byte_util.hpp.
|
constexprnoexcept |
Definition at line 711 of file byte_util.hpp.
|
constexprnoexcept |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const jau::IllegalArgumentException & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const jau::IllegalStateException & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const jau::IndexOutOfBoundsException & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const jau::InternalError & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const jau::NullPointerException & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const jau::OutOfMemoryError & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const jau::RuntimeException & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const jau::UnsupportedOperationException & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const std::bad_alloc & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const std::exception & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const std::invalid_argument & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::raise_java_exception | ( | JNIEnv * | env, |
const std::runtime_error & | e, | ||
const char * | file, | ||
int | line | ||
) |
void jau::rethrow_and_raise_java_exception_jauimpl | ( | JNIEnv * | env, |
const char * | file, | ||
int | line | ||
) |
Re-throw current exception and raise respective java exception using any matching function above.
jclass jau::search_class | ( | JNIEnv * | env, |
const char * | clazz_name | ||
) |
jclass jau::search_class | ( | JNIEnv * | env, |
JavaUplink & | object | ||
) |
jclass jau::search_class | ( | JNIEnv * | env, |
jobject | obj | ||
) |
jfieldID jau::search_field | ( | JNIEnv * | env, |
jclass | clazz, | ||
const char * | field_name, | ||
const char * | type, | ||
bool | is_static | ||
) |
jmethodID jau::search_method | ( | JNIEnv * | env, |
jclass | clazz, | ||
const char * | method_name, | ||
const char * | prototype, | ||
bool | is_static | ||
) |
|
inline |
Definition at line 147 of file basic_types.hpp.
|
inline |
Definition at line 165 of file basic_types.hpp.
void jau::setInstance | ( | JNIEnv * | env, |
jobject | obj, | ||
T * | t | ||
) |
Definition at line 286 of file helper_jni.hpp.
void jau::setJavaUplinkObject | ( | JNIEnv * | env, |
jobject | obj, | ||
T * | t | ||
) |
void jau::setObjectRef | ( | JNIEnv * | env, |
jobject | obj, | ||
T * | t, | ||
const char * | field_name | ||
) |
|
constexprnoexcept |
Returns the value of the sign function.
-1 for x < 0 0 for x = 0 1 for x > 0
Implementation is type safe.
T | an integral number type |
x | the integral number |
Definition at line 55 of file int_math.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 696 of file cow_vector.hpp.
|
inline |
Definition at line 159 of file basic_types.hpp.
|
inline |
Definition at line 177 of file basic_types.hpp.
|
noexcept |
Produce a decimal string representation of an integral integer value.
T | an integral integer type |
v | the integral integer value |
separator | if not 0, use as separation character, otherwise no separation characters are being used |
width | the minimum number of characters to be printed. Add padding with blank space if result is shorter. |
Definition at line 143 of file string_util.hpp.
|
noexcept |
Produce a lower-case hexadecimal string representation of the given pointer.
Produce a lower-case hexadecimal string representation of the given value with standard layout.
value_type | a pointer type |
v | the pointer of given pointer type |
value_type | a standard layout value type |
v | the value of given standard layout type |
Definition at line 104 of file string_util.hpp.
|
noexcept |
Return std::string representation of the given jau::endian.
v | the jau::endian value |
Definition at line 198 of file byte_util.hpp.
std::string jau::to_string | ( | const value_type & | ref | ) |
Definition at line 180 of file string_util.hpp.
|
noexcept |
|
noexcept |
trim in place
Definition at line 77 of file basic_types.cpp.
|
noexcept |
|
noexcept |
Use for unconditional warning messages, prefix '[elapsed_time] Warning @ file:line: '.
Definition at line 149 of file debug.cpp.
|
noexcept |
|
constexpr |
Value access of has_builtin_bit_cast type trait for convenience .
Dummy_type | just to make template SFINAE happy |
Definition at line 194 of file cpp_lang_util.hpp.
|
constexpr |
Value access of big-endian type trait for convenience .
Since all endian definitions are of constexpr
, code can simply use expressions of these for compile-time evaluation and optimization. A template SFINAE
is not required.
Dummy_type | just to make template SFINAE happy |
Definition at line 290 of file byte_util.hpp.
|
constexpr |
Value access of little-endian type trait for convenience .
Since all endian definitions are of constexpr
, code can simply use expressions of these for compile-time evaluation and optimization. A template SFINAE
is not required.
Dummy_type | just to make template SFINAE happy |
Definition at line 270 of file byte_util.hpp.
|
inlineconstexpr |
Definition at line 313 of file type_traits_queries.hpp.
|
inlineconstexpr |
Definition at line 304 of file type_traits_queries.hpp.
|
inlineconstexpr |
Definition at line 301 of file type_traits_queries.hpp.
const char* jau::VERSION |
const char* jau::VERSION_API |
const char* jau::VERSION_SHORT |