Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
jau Namespace Reference

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 Documentation

◆ nsize_t

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.

Examples
test_cow_darray_01.cpp, and test_cow_darray_perf01.cpp.

Definition at line 44 of file int_types.hpp.

◆ relaxed_atomic_bool

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.

◆ relaxed_atomic_int

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.

◆ relaxed_atomic_int16

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.

◆ relaxed_atomic_int32

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.

◆ relaxed_atomic_int64

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.

◆ relaxed_atomic_int8

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.

◆ relaxed_atomic_nsize_t

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.

◆ relaxed_atomic_size_t

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.

◆ relaxed_atomic_snsize_t

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.

◆ relaxed_atomic_ssize_t

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.

◆ relaxed_atomic_uint16

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.

◆ relaxed_atomic_uint32

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.

◆ relaxed_atomic_uint64

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.

◆ relaxed_atomic_uint8

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.

◆ sc_atomic_bool

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.

◆ sc_atomic_int

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.

◆ sc_atomic_int16

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.

◆ sc_atomic_int32

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.

◆ sc_atomic_int64

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.

◆ sc_atomic_int8

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.

◆ sc_atomic_nsize_t

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.

◆ sc_atomic_size_t

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.

◆ sc_atomic_snsize_t

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.

◆ sc_atomic_ssize_t

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.

◆ sc_atomic_uint16

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.

◆ sc_atomic_uint32

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.

◆ sc_atomic_uint64

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.

◆ sc_atomic_uint8

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.

◆ snsize_t

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.

Enumeration Type Documentation

◆ endian

enum jau::endian : uint32_t
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.

Enumerator
little 

Identifier for little endian.

big 

Identifier for big endian.

pdp 

Identifier for DEC PDP-11, aka ENDIAN_LITTLE_WORD.

honeywell 

Identifier for Honeywell 316, aka ENDIAN_BIG_WORD.

undefined 

Undetermined endian.

native 

Identifier for native platform type, one of the above.

Definition at line 170 of file byte_util.hpp.

◆ TypeTraitGroup

enum jau::TypeTraitGroup : uint8_t
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.

Function Documentation

◆ ABORT_impl()

void jau::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: '.

Function also appends last errno and strerror(errno).

Definition at line 116 of file debug.cpp.

Here is the call graph for this function:

◆ abs()

template<typename T >
constexpr T jau::abs ( const T  x)
constexprnoexcept

Returns the absolute value of an integral number.

Implementation uses jau::invert_sign() to have a safe absolute value conversion, if required.

Template Parameters
Tan integral number type
Parameters
xthe integral number
Returns
function result

Definition at line 100 of file int_math.hpp.

Here is the call graph for this function:

◆ almost_equal()

template<class T >
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.

Template Parameters
Ta non integer float type
Parameters
avalue to compare
bvalue to compare
ulpdesired precision in ULPs (units in the last place), defaults to 1
epsilonthe machine epsilon of type T, defaults to std::numeric_limits<T>::epsilon()

Definition at line 102 of file float_math.hpp.

◆ be_to_cpu() [1/6]

constexpr uint128_t jau::be_to_cpu ( uint128_t const &  n)
constexprnoexcept

Definition at line 418 of file byte_util.hpp.

Here is the call graph for this function:

◆ be_to_cpu() [2/6]

constexpr uint16_t jau::be_to_cpu ( uint16_t const  n)
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!

Examples
test_basictypeconv.cpp.

Definition at line 306 of file byte_util.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ be_to_cpu() [3/6]

constexpr uint192_t jau::be_to_cpu ( uint192_t const &  n)
constexprnoexcept

Definition at line 455 of file byte_util.hpp.

Here is the call graph for this function:

◆ be_to_cpu() [4/6]

constexpr uint256_t jau::be_to_cpu ( uint256_t const &  n)
constexprnoexcept

Definition at line 492 of file byte_util.hpp.

Here is the call graph for this function:

◆ be_to_cpu() [5/6]

constexpr uint32_t jau::be_to_cpu ( uint32_t const  n)
constexprnoexcept

Definition at line 344 of file byte_util.hpp.

Here is the call graph for this function:

◆ be_to_cpu() [6/6]

constexpr uint64_t jau::be_to_cpu ( uint64_t const &  n)
constexprnoexcept

Definition at line 381 of file byte_util.hpp.

Here is the call graph for this function:

◆ bindCaptureFunc() [1/2]

template<typename R , typename I , typename... A>
jau::FunctionDef<R, A...> jau::bindCaptureFunc ( const I &  data,
R(*)(I &, A...)  func,
bool  dataIsIdentity = true 
)
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.

Examples
test_functiondef01.cpp.

Definition at line 380 of file function_def.hpp.

Here is the caller graph for this function:

◆ bindCaptureFunc() [2/2]

template<typename R , typename I , typename... A>
jau::FunctionDef<R, A...> jau::bindCaptureFunc ( I &&  data,
R(*)(I &, A...)  func,
bool  dataIsIdentity = true 
)
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.

◆ bindMemberFunc()

template<typename R , typename C , typename... A>
jau::FunctionDef<R, A...> jau::bindMemberFunc ( C *  base,
R(C::*)(A...)  mfunc 
)
inlinenoexcept
Examples
test_functiondef01.cpp.

Definition at line 361 of file function_def.hpp.

Here is the caller graph for this function:

◆ bindPlainFunc()

template<typename R , typename... A>
jau::FunctionDef<R, A...> jau::bindPlainFunc ( R(*)(A...)  func)
inlinenoexcept
Examples
test_functiondef01.cpp.

Definition at line 367 of file function_def.hpp.

Here is the caller graph for this function:

◆ bindStdFunc() [1/2]

template<typename R , typename... A>
jau::FunctionDef<R, A...> jau::bindStdFunc ( uint64_t  id)
inlinenoexcept

Definition at line 403 of file function_def.hpp.

◆ bindStdFunc() [2/2]

template<typename R , typename... A>
jau::FunctionDef<R, A...> jau::bindStdFunc ( uint64_t  id,
std::function< R(A...)>  func 
)
inlinenoexcept
Examples
test_functiondef01.cpp.

Definition at line 398 of file function_def.hpp.

Here is the caller graph for this function:

◆ bit_cast()

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> jau::bit_cast ( const Source &  src)
constexprnoexcept

C++20 bit_cast<>(arg) implementation for C++17.

Functional if is_builtin_bit_cast_available() evaluates true.

Template Parameters
Destthe target type
Sourcethe source argument type
Parameters
srcthe value to convert to Dest type
Returns
the converted Dest type value
See also
jau::has_builtin_bit_cast
is_builtin_bit_cast_available()
pointer_cast()

Definition at line 267 of file cpp_lang_util.hpp.

Here is the call graph for this function:

◆ bswap() [1/6]

constexpr uint128_t jau::bswap ( uint128_t const &  source)
constexprnoexcept

Definition at line 101 of file byte_util.hpp.

◆ bswap() [2/6]

constexpr uint16_t jau::bswap ( uint16_t const  source)
constexprnoexcept
Examples
test_basictypeconv.cpp.

Definition at line 66 of file byte_util.hpp.

Here is the caller graph for this function:

◆ bswap() [3/6]

constexpr uint192_t jau::bswap ( uint192_t const &  source)
constexprnoexcept

Definition at line 111 of file byte_util.hpp.

◆ bswap() [4/6]

constexpr uint256_t jau::bswap ( uint256_t const &  source)
constexprnoexcept

Definition at line 121 of file byte_util.hpp.

◆ bswap() [5/6]

constexpr uint32_t jau::bswap ( uint32_t const  source)
constexprnoexcept

Definition at line 75 of file byte_util.hpp.

◆ bswap() [6/6]

constexpr uint64_t jau::bswap ( uint64_t const &  source)
constexprnoexcept

Definition at line 86 of file byte_util.hpp.

◆ byteHexString()

std::string & jau::byteHexString ( std::string &  dest,
const uint8_t  value,
const bool  lowerCase 
)
noexcept

Produce a hexadecimal string representation of the given byte value.

Parameters
destthe std::string reference destination to append
valuethe byte value to represent
lowerCasetrue to use lower case hex-chars, otherwise capital letters are being used.
Returns
the given std::string reference for chaining

Definition at line 203 of file basic_types.cpp.

Here is the caller graph for this function:

◆ bytesHexString()

std::string jau::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.

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.

Parameters
bytespointer to the first byte to print, less offset
offsetoffset to bytes pointer to the first byte to print
lengthnumber of bytes to print
lsbFirsttrue 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.
lowerCasetrue to use lower case hex-chars, otherwise capital letters are being used.
Returns
the hex-string representation of the data

Definition at line 167 of file basic_types.cpp.

Here is the caller graph for this function:

◆ castInstance()

template<typename T >
T* jau::castInstance ( jlong  instance)

Definition at line 242 of file helper_jni.hpp.

◆ clear_bit_uint32()

void jau::clear_bit_uint32 ( const uint8_t  nr,
uint32_t &  mask 
)
inline

Definition at line 153 of file basic_types.hpp.

◆ clear_bit_uint64()

void jau::clear_bit_uint64 ( const uint8_t  nr,
uint64_t &  mask 
)
inline

Definition at line 171 of file basic_types.hpp.

◆ clearInstance()

void jau::clearInstance ( JNIEnv *  env,
jobject  obj 
)
inline

Definition at line 295 of file helper_jni.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ COND_PRINT_impl()

void jau::COND_PRINT_impl ( const char *  format,
  ... 
)
noexcept

Definition at line 197 of file debug.cpp.

Here is the call graph for this function:

◆ convert_instance_to_jobject()

template<typename T >
jobject jau::convert_instance_to_jobject ( JNIEnv *  env,
T *  elem,
const char *  ctor_prototype,
std::function< jobject(JNIEnv *, jclass, jmethodID, T *)>  ctor 
)

Definition at line 322 of file helper_jni.hpp.

Here is the call graph for this function:

◆ convert_vector_sharedptr_to_jarraylist() [1/2]

template<typename T >
jobject jau::convert_vector_sharedptr_to_jarraylist ( JNIEnv *  env,
T &  array 
)

Definition at line 339 of file helper_jni.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ convert_vector_sharedptr_to_jarraylist() [2/2]

template<typename T , typename U >
jobject jau::convert_vector_sharedptr_to_jarraylist ( JNIEnv *  env,
T &  array,
const char *  ctor_prototype,
std::function< jobject(JNIEnv *, jclass, jmethodID, U *)>  ctor 
)

Definition at line 422 of file helper_jni.hpp.

Here is the call graph for this function:

◆ convert_vector_uniqueptr_to_jarraylist() [1/2]

template<typename T , typename U >
jobject jau::convert_vector_uniqueptr_to_jarraylist ( JNIEnv *  env,
T &  array,
const char *  ctor_prototype 
)

Definition at line 361 of file helper_jni.hpp.

Here is the call graph for this function:

◆ convert_vector_uniqueptr_to_jarraylist() [2/2]

template<typename T , typename U >
jobject jau::convert_vector_uniqueptr_to_jarraylist ( JNIEnv *  env,
T &  array,
const char *  ctor_prototype,
std::function< jobject(JNIEnv *, jclass, jmethodID, U *)>  ctor 
)

Definition at line 391 of file helper_jni.hpp.

Here is the call graph for this function:

◆ cpu_to_be() [1/6]

constexpr uint128_t jau::cpu_to_be ( uint128_t const &  h)
constexprnoexcept

Definition at line 427 of file byte_util.hpp.

Here is the call graph for this function:

◆ cpu_to_be() [2/6]

constexpr uint16_t jau::cpu_to_be ( uint16_t const  h)
constexprnoexcept

Definition at line 316 of file byte_util.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cpu_to_be() [3/6]

constexpr uint192_t jau::cpu_to_be ( uint192_t const &  h)
constexprnoexcept

Definition at line 464 of file byte_util.hpp.

Here is the call graph for this function:

◆ cpu_to_be() [4/6]

constexpr uint256_t jau::cpu_to_be ( uint256_t const &  h)
constexprnoexcept

Definition at line 501 of file byte_util.hpp.

Here is the call graph for this function:

◆ cpu_to_be() [5/6]

constexpr uint32_t jau::cpu_to_be ( uint32_t const  h)
constexprnoexcept

Definition at line 353 of file byte_util.hpp.

Here is the call graph for this function:

◆ cpu_to_be() [6/6]

constexpr uint64_t jau::cpu_to_be ( uint64_t const &  h)
constexprnoexcept

Definition at line 390 of file byte_util.hpp.

Here is the call graph for this function:

◆ cpu_to_le() [1/6]

constexpr uint128_t jau::cpu_to_le ( uint128_t const &  h)
constexprnoexcept

Definition at line 445 of file byte_util.hpp.

Here is the call graph for this function:

◆ cpu_to_le() [2/6]

constexpr uint16_t jau::cpu_to_le ( uint16_t const  h)
constexprnoexcept

Definition at line 334 of file byte_util.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cpu_to_le() [3/6]

constexpr uint192_t jau::cpu_to_le ( uint192_t const &  h)
constexprnoexcept

Definition at line 482 of file byte_util.hpp.

Here is the call graph for this function:

◆ cpu_to_le() [4/6]

constexpr uint256_t jau::cpu_to_le ( uint256_t const &  h)
constexprnoexcept

Definition at line 519 of file byte_util.hpp.

Here is the call graph for this function:

◆ cpu_to_le() [5/6]

constexpr uint32_t jau::cpu_to_le ( uint32_t const  h)
constexprnoexcept

Definition at line 371 of file byte_util.hpp.

Here is the call graph for this function:

◆ cpu_to_le() [6/6]

constexpr uint64_t jau::cpu_to_le ( uint64_t const &  h)
constexprnoexcept

Definition at line 408 of file byte_util.hpp.

Here is the call graph for this function:

◆ DBG_PRINT_impl()

void jau::DBG_PRINT_impl ( const char *  format,
  ... 
)
noexcept

Definition at line 96 of file debug.cpp.

Here is the call graph for this function:

◆ dfa_utf8_decode() [1/2]

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.

Here is the call graph for this function:

◆ dfa_utf8_decode() [2/2]

uint32_t jau::dfa_utf8_decode ( uint32_t &  state,
uint32_t &  codep,
const uint32_t  byte_value 
)
Examples
dbt_scanner00.cpp, and dbt_scanner10.cpp.

Definition at line 90 of file dfa_utf8_decode.cpp.

Here is the caller graph for this function:

◆ digits10() [1/2]

template<typename T >
constexpr nsize_t jau::digits10 ( const T  x,
const bool  sign_is_digit = true 
)
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.

Template Parameters
Tan integral integer type
Parameters
xthe integral integer
sign_is_digitif true and value is negative, adds one to result for sign. Defaults to true.
Returns
digit count

Definition at line 151 of file int_math.hpp.

◆ digits10() [2/2]

template<typename T >
constexpr nsize_t jau::digits10 ( const T  x,
const snsize_t  x_sign,
const bool  sign_is_digit = true 
)
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.

Template Parameters
Tan integral integer type
Parameters
xthe integral integer
x_signthe pre-determined sign of the given value x
sign_is_digitif true and value is negative, adds one to result for sign. Defaults to true.
Returns
digit count
Examples
test_intdecstring01.cpp.

Definition at line 124 of file int_math.hpp.

◆ ERR_PRINT_impl()

void jau::ERR_PRINT_impl ( const char *  prefix,
const bool  backtrace,
const char *  func,
const char *  file,
const int  line,
const char *  format,
  ... 
)
noexcept

Definition at line 136 of file debug.cpp.

Here is the call graph for this function:

◆ ERR_PRINTv()

void jau::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: '.

Function also appends last errno and strerror(errno).

Definition at line 128 of file debug.cpp.

Here is the call graph for this function:

◆ find()

template<class InputIt , class T >
constexpr InputIt jau::find ( InputIt  first,
InputIt  last,
const T &  value 
)
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

Template Parameters
InputItthe iterator type
Tthe data type
Parameters
firstrange start of elements to examine
lastrange end of elements to examine, exclusive
valuereference value for comparison
Returns
Iterator to the first element satisfying the condition or last if no such element is found.

Definition at line 88 of file basic_algos.hpp.

◆ find_const() [1/2]

template<class T >
const T::value_type* jau::find_const ( T &  data,
typename T::value_type const &  elem,
std::enable_if_t< !is_cow_type< T >::value, bool >  = true 
)
noexcept

Definition at line 306 of file basic_algos.hpp.

◆ find_const() [2/2]

template<class T >
const T::value_type* jau::find_const ( T &  data,
typename T::value_type const &  elem,
std::enable_if_t< is_cow_type< T >::value, bool >  = true 
)
noexcept

Definition at line 295 of file basic_algos.hpp.

◆ find_if()

template<class InputIt , class UnaryPredicate >
constexpr InputIt jau::find_if ( InputIt  first,
InputIt  last,
UnaryPredicate  p 
)
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

Template Parameters
InputItthe iterator type
UnaryPredicate
Parameters
firstrange start of elements to examine
lastrange end of elements to examine, exclusive
punary predicate which returns ​true for the desired element.
Returns
Iterator to the first element satisfying the condition or last if no such element is found.

Definition at line 113 of file basic_algos.hpp.

Here is the caller graph for this function:

◆ find_if_not()

template<class InputIt , class UnaryPredicate >
constexpr InputIt jau::find_if_not ( InputIt  first,
InputIt  last,
UnaryPredicate  q 
)
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

Template Parameters
InputItthe iterator type
UnaryPredicate
Parameters
firstrange start of elements to examine
lastrange end of elements to examine, exclusive
qunary predicate which returns ​false for the desired element.
Returns
Iterator to the first element satisfying the condition or last if no such element is found.

Definition at line 138 of file basic_algos.hpp.

◆ for_each()

template<class InputIt , class UnaryFunction >
constexpr UnaryFunction jau::for_each ( InputIt  first,
InputIt  last,
UnaryFunction  f 
)
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

Template Parameters
InputItthe iterator type
UnaryFunction
Parameters
firstrange start of elements to apply the function
lastrange end of elements to apply the function
fthe function object, like void fun(const Type &a)
Returns
the function
Examples
test_cow_darray_01.cpp.

Definition at line 163 of file basic_algos.hpp.

Here is the caller graph for this function:

◆ for_each_const() [1/2]

template<class T , class UnaryFunction >
constexpr UnaryFunction jau::for_each_const ( T &  data,
UnaryFunction  f,
std::enable_if_t< !is_cow_type< T >::value, bool >  = true 
)
constexprnoexcept

Definition at line 332 of file basic_algos.hpp.

◆ for_each_const() [2/2]

template<class T , class UnaryFunction >
constexpr UnaryFunction jau::for_each_const ( T &  data,
UnaryFunction  f,
std::enable_if_t< is_cow_type< T >::value, bool >  = true 
)
constexprnoexcept
Examples
dbt_scanner10.cpp, and test_cow_iterator_01.cpp.

Definition at line 323 of file basic_algos.hpp.

Here is the caller graph for this function:

◆ for_each_fidelity() [1/3]

template<class InputIt , class UnaryFunction >
constexpr UnaryFunction jau::for_each_fidelity ( InputIt  first,
InputIt  last,
UnaryFunction  f 
)
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.

Template Parameters
InputItthe iterator type, which might be a 'const_iterator' for non const types.
UnaryFunction
Parameters
firstrange start of elements to apply the function
lastrange end of elements to apply the function
fthe function object, like void fun(const Type &a)
Returns
the function
See also
jau::cow_darray
jau::cow_ro_iterator
jau::cow_rw_iterator

Definition at line 215 of file basic_algos.hpp.

Here is the caller graph for this function:

◆ for_each_fidelity() [2/3]

template<class T , class UnaryFunction >
constexpr UnaryFunction jau::for_each_fidelity ( T &  data,
UnaryFunction  f,
std::enable_if_t< !is_cow_type< T >::value, bool >  = true 
)
constexprnoexcept

See jau::for_each_fidelity()

Definition at line 362 of file basic_algos.hpp.

◆ for_each_fidelity() [3/3]

template<class T , class UnaryFunction >
constexpr UnaryFunction jau::for_each_fidelity ( T &  data,
UnaryFunction  f,
std::enable_if_t< is_cow_type< T >::value, bool >  = true 
)
constexprnoexcept

See jau::for_each_fidelity()

Definition at line 350 of file basic_algos.hpp.

◆ for_each_idx()

template<class InputArray , class UnaryFunction >
constexpr UnaryFunction jau::for_each_idx ( InputArray &  array,
UnaryFunction  f 
)
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.

◆ for_each_idx_mtx()

template<class Mutex , class InputArray , class UnaryFunction >
constexpr UnaryFunction jau::for_each_idx_mtx ( Mutex &  mtx,
InputArray &  array,
UnaryFunction  f 
)
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.

◆ for_each_mtx()

template<class Mutex , class InputIt , class UnaryFunction >
constexpr UnaryFunction jau::for_each_mtx ( Mutex &  mtx,
InputIt  first,
InputIt  last,
UnaryFunction  f 
)
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.

◆ fprintf_td()

int jau::fprintf_td ( FILE *  stream,
const char *  format,
  ... 
)
noexcept

Convenient fprintf() invocation, prepending the environment::getElapsedMillisecond() timestamp.

Parameters
streamthe output stream
formatthe format
argsthe optional arguments
Examples
dbt_scanner10.cpp.

Definition at line 188 of file debug.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ from_jboolean_to_bool()

bool jau::from_jboolean_to_bool ( jboolean  val)

◆ from_jstring_to_string()

std::string jau::from_jstring_to_string ( JNIEnv *  env,
jstring  str 
)
Here is the caller graph for this function:

◆ from_string_to_jstring()

jstring jau::from_string_to_jstring ( JNIEnv *  env,
const std::string &  str 
)
Here is the caller graph for this function:

◆ generic_clone()

template<typename T >
jobject jau::generic_clone ( JNIEnv *  env,
jobject  obj 
)

Definition at line 300 of file helper_jni.hpp.

Here is the call graph for this function:

◆ get_backtrace()

std::string jau::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.

Returns one line per stack frame, each with

  • stack frame number
  • demangled function name + offset (sp)
  • the instruction pointer (pc)
  • the stack pointer (sp)
Parameters
skip_anon_framesif true, skip all frames w/o proc-name
skip_framesnumber of stack frames to skip, default is one frame for this function.
max_framesnumber of stack frames to be printed or -1 for unlimited, defaults to -1
Returns
the de-mangled backtrace, separated by newline

Definition at line 36 of file debug.cpp.

Here is the caller graph for this function:

◆ get_int8()

constexpr int8_t jau::get_int8 ( uint8_t const *  buffer,
nsize_t const  byte_offset 
)
constexprnoexcept

Definition at line 544 of file byte_util.hpp.

Here is the caller graph for this function:

◆ get_new_arraylist()

jobject jau::get_new_arraylist ( JNIEnv *  env,
jsize  size,
jmethodID *  add 
)
Here is the caller graph for this function:

◆ get_string()

std::string jau::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).

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.

◆ get_uint128() [1/2]

constexpr uint128_t jau::get_uint128 ( uint8_t const *  buffer,
nsize_t const  byte_offset 
)
constexprnoexcept

Definition at line 657 of file byte_util.hpp.

Here is the caller graph for this function:

◆ get_uint128() [2/2]

constexpr uint128_t jau::get_uint128 ( uint8_t const *  buffer,
nsize_t const  byte_offset,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 661 of file byte_util.hpp.

Here is the call graph for this function:

◆ get_uint16() [1/2]

constexpr uint16_t jau::get_uint16 ( uint8_t const *  buffer,
nsize_t const  byte_offset 
)
constexprnoexcept

Definition at line 586 of file byte_util.hpp.

Here is the caller graph for this function:

◆ get_uint16() [2/2]

constexpr uint16_t jau::get_uint16 ( uint8_t const *  buffer,
nsize_t const  byte_offset,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 600 of file byte_util.hpp.

Here is the call graph for this function:

◆ get_uint192() [1/2]

constexpr uint192_t jau::get_uint192 ( uint8_t const *  buffer,
nsize_t const  byte_offset 
)
constexprnoexcept

Definition at line 674 of file byte_util.hpp.

Here is the caller graph for this function:

◆ get_uint192() [2/2]

constexpr uint192_t jau::get_uint192 ( uint8_t const *  buffer,
nsize_t const  byte_offset,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 678 of file byte_util.hpp.

Here is the call graph for this function:

◆ get_uint256() [1/2]

constexpr uint256_t jau::get_uint256 ( uint8_t const *  buffer,
nsize_t const  byte_offset 
)
constexprnoexcept

Definition at line 691 of file byte_util.hpp.

Here is the caller graph for this function:

◆ get_uint256() [2/2]

constexpr uint256_t jau::get_uint256 ( uint8_t const *  buffer,
nsize_t const  byte_offset,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 695 of file byte_util.hpp.

Here is the call graph for this function:

◆ get_uint32() [1/2]

constexpr uint32_t jau::get_uint32 ( uint8_t const *  buffer,
nsize_t const  byte_offset 
)
constexprnoexcept

Definition at line 623 of file byte_util.hpp.

Here is the caller graph for this function:

◆ get_uint32() [2/2]

constexpr uint32_t jau::get_uint32 ( uint8_t const *  buffer,
nsize_t const  byte_offset,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 627 of file byte_util.hpp.

Here is the call graph for this function:

◆ get_uint64() [1/2]

constexpr uint64_t jau::get_uint64 ( uint8_t const *  buffer,
nsize_t const  byte_offset 
)
constexprnoexcept

Definition at line 640 of file byte_util.hpp.

Here is the caller graph for this function:

◆ get_uint64() [2/2]

constexpr uint64_t jau::get_uint64 ( uint8_t const *  buffer,
nsize_t const  byte_offset,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 644 of file byte_util.hpp.

Here is the call graph for this function:

◆ get_uint8()

constexpr uint8_t jau::get_uint8 ( uint8_t const *  buffer,
nsize_t const  byte_offset 
)
constexprnoexcept

Definition at line 540 of file byte_util.hpp.

Here is the caller graph for this function:

◆ get_value() [1/2]

template<typename T >
constexpr std::enable_if_t< std::is_standard_layout_v<T>, T> jau::get_value ( uint8_t const *  buffer,
nsize_t const  byte_offset 
)
constexprnoexcept

Definition at line 732 of file byte_util.hpp.

◆ get_value() [2/2]

template<typename T >
constexpr std::enable_if_t< std::is_standard_layout_v<T>, T> jau::get_value ( uint8_t const *  buffer,
nsize_t const  byte_offset,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 742 of file byte_util.hpp.

Here is the call graph for this function:

◆ getCurrentMilliseconds()

uint64_t jau::getCurrentMilliseconds ( )
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.

Examples
dbt_scanner00.cpp, dbt_scanner01.cpp, and dbt_scanner10.cpp.

Definition at line 47 of file basic_types.cpp.

Here is the caller graph for this function:

◆ getField()

jfieldID jau::getField ( JNIEnv *  env,
jobject  obj,
const char *  field_name,
const char *  field_signature 
)
Here is the caller graph for this function:

◆ getInstance()

template<typename T >
T* jau::getInstance ( JNIEnv *  env,
jobject  obj 
)

Definition at line 268 of file helper_jni.hpp.

Here is the call graph for this function:

◆ getInstanceField()

jfieldID jau::getInstanceField ( JNIEnv *  env,
jobject  obj 
)
inline

Definition at line 109 of file helper_jni.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getInstanceUnchecked()

template<typename T >
T* jau::getInstanceUnchecked ( JNIEnv *  env,
jobject  obj 
)

Definition at line 279 of file helper_jni.hpp.

Here is the call graph for this function:

◆ getJavaUplinkObject()

template<typename T >
T* jau::getJavaUplinkObject ( JNIEnv *  env,
jobject  obj 
)

Definition at line 209 of file helper_jni.hpp.

Here is the call graph for this function:

◆ getJavaUplinkObjectUnchecked()

template<typename T >
T* jau::getJavaUplinkObjectUnchecked ( JNIEnv *  env,
jobject  obj 
)

Definition at line 221 of file helper_jni.hpp.

Here is the call graph for this function:

◆ getObjectRef()

template<typename T >
T* jau::getObjectRef ( JNIEnv *  env,
jobject  obj,
const char *  field_name 
)

Definition at line 252 of file helper_jni.hpp.

Here is the call graph for this function:

◆ getWallClockSeconds()

uint64_t jau::getWallClockSeconds ( )
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.

◆ in_range()

template<class T >
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.

Template Parameters
Tan integral type
Parameters
avalue to compare
bvalue to compare
deltathe maximum difference both values may differ

Definition at line 47 of file float_math.hpp.

◆ INFO_PRINT()

void jau::INFO_PRINT ( const char *  format,
  ... 
)
noexcept

Use for unconditional informal messages, prefix '[elapsed_time] Info: '.

Definition at line 166 of file debug.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ invert_sign()

template<typename T >
constexpr T jau::invert_sign ( const T  x)
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
Template Parameters
T
Parameters
x
Returns

Definition at line 85 of file int_math.hpp.

Here is the caller graph for this function:

◆ is_builtin_bit_cast_available()

constexpr bool jau::is_builtin_bit_cast_available ( )
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
Returns
true if query subject is available, otherwise not.
See also
has_builtin_bit_cast
bit_cast()
pointer_cast()
Examples
test_basictypeconv.cpp.

Definition at line 243 of file cpp_lang_util.hpp.

Here is the caller graph for this function:

◆ isBigEndian()

constexpr bool jau::isBigEndian ( )
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.

Here is the caller graph for this function:

◆ isDefinedEndian()

constexpr bool jau::isDefinedEndian ( const endian v)
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.

◆ isLittleEndian()

constexpr bool jau::isLittleEndian ( )
constexprnoexcept

Evaluates true if platform is running in little endian mode, i.e.

jau::endian::little == jau::endian::native.

Examples
test_basictypeconv.cpp.

Definition at line 232 of file byte_util.hpp.

Here is the caller graph for this function:

◆ isLittleOrBigEndian()

constexpr bool jau::isLittleOrBigEndian ( )
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.

Here is the caller graph for this function:

◆ isTypeTraitBitSet()

constexpr bool jau::isTypeTraitBitSet ( const TypeTraitGroup  mask,
const TypeTraitGroup  bit 
)
constexprnoexcept

Definition at line 71 of file type_traits_queries.hpp.

Here is the caller graph for this function:

◆ java_exception_check()

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.

◆ java_exception_check_and_throw()

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*).

Here is the caller graph for this function:

◆ le_to_cpu() [1/6]

constexpr uint128_t jau::le_to_cpu ( uint128_t const &  l)
constexprnoexcept

Definition at line 436 of file byte_util.hpp.

Here is the call graph for this function:

◆ le_to_cpu() [2/6]

constexpr uint16_t jau::le_to_cpu ( uint16_t const  l)
constexprnoexcept
Examples
test_basictypeconv.cpp.

Definition at line 325 of file byte_util.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ le_to_cpu() [3/6]

constexpr uint192_t jau::le_to_cpu ( uint192_t const &  l)
constexprnoexcept

Definition at line 473 of file byte_util.hpp.

Here is the call graph for this function:

◆ le_to_cpu() [4/6]

constexpr uint256_t jau::le_to_cpu ( uint256_t const &  l)
constexprnoexcept

Definition at line 510 of file byte_util.hpp.

Here is the call graph for this function:

◆ le_to_cpu() [5/6]

constexpr uint32_t jau::le_to_cpu ( uint32_t const  l)
constexprnoexcept

Definition at line 362 of file byte_util.hpp.

Here is the call graph for this function:

◆ le_to_cpu() [6/6]

constexpr uint64_t jau::le_to_cpu ( uint64_t const &  l)
constexprnoexcept

Definition at line 399 of file byte_util.hpp.

Here is the call graph for this function:

◆ machine_equal()

template<class T >
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.

Template Parameters
Ta non integer float type
Parameters
avalue to compare
bvalue to compare
ulpdesired precision in ULPs (units in the last place), defaults to 1
epsilonthe machine epsilon of type T, defaults to std::numeric_limits<T>::epsilon()

Definition at line 83 of file float_math.hpp.

Here is the caller graph for this function:

◆ machineEpsilon()

template<class T >
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.

Template Parameters
Ta non integer float type
Returns
machine epsilon of T

Definition at line 62 of file float_math.hpp.

◆ merge_uint128() [1/2]

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.

Here is the call graph for this function:

◆ merge_uint128() [2/2]

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.

Here is the call graph for this function:

◆ number()

constexpr uint8_t jau::number ( const TypeTraitGroup  rhs)
constexprnoexcept
Examples
test_mm_sc_drf_00.cpp, and test_mm_sc_drf_01.cpp.

Definition at line 53 of file type_traits_queries.hpp.

Here is the caller graph for this function:

◆ operator!=() [1/9]

template<class T1 , class T2 >
bool jau::operator!= ( const callocator< T1 > &  lhs,
const callocator< T2 > &  rhs 
)
noexcept
Examples
test_functiondef01.cpp.

Definition at line 155 of file callocator.hpp.

◆ operator!=() [2/9]

template<class T1 , class T2 >
bool jau::operator!= ( const counting_allocator< T1 > &  lhs,
const counting_allocator< T2 > &  rhs 
)
noexcept

Definition at line 225 of file counting_allocator.hpp.

◆ operator!=() [3/9]

template<class T1 , class T2 >
bool jau::operator!= ( const counting_callocator< T1 > &  lhs,
const counting_callocator< T2 > &  rhs 
)
noexcept

Definition at line 240 of file counting_callocator.hpp.

◆ operator!=() [4/9]

template<typename Value_type , typename Alloc_type >
bool jau::operator!= ( const cow_darray< Value_type, Alloc_type > &  rhs,
const cow_darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1047 of file cow_darray.hpp.

◆ operator!=() [5/9]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 964 of file cow_iterator.hpp.

◆ operator!=() [6/9]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 974 of file cow_iterator.hpp.

◆ operator!=() [7/9]

template<typename Value_type , typename Alloc_type >
bool jau::operator!= ( const cow_vector< Value_type, Alloc_type > &  rhs,
const cow_vector< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 670 of file cow_vector.hpp.

◆ operator!=() [8/9]

template<typename Value_type , typename Alloc_type >
bool jau::operator!= ( const darray< Value_type, Alloc_type > &  rhs,
const darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1173 of file darray.hpp.

◆ operator!=() [9/9]

constexpr bool jau::operator!= ( const TypeTraitGroup  lhs,
const TypeTraitGroup  rhs 
)
constexprnoexcept

Definition at line 68 of file type_traits_queries.hpp.

◆ operator&()

constexpr TypeTraitGroup jau::operator& ( const TypeTraitGroup  lhs,
const TypeTraitGroup  rhs 
)
constexprnoexcept

Definition at line 62 of file type_traits_queries.hpp.

Here is the call graph for this function:

◆ operator-() [1/2]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr Storage_type::difference_type jau::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 
)
constexprnoexcept

Definition at line 1019 of file cow_iterator.hpp.

◆ operator-() [2/2]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr Storage_type::difference_type jau::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 
)
constexprnoexcept

Definition at line 1025 of file cow_iterator.hpp.

◆ operator<() [1/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator< ( const cow_darray< Value_type, Alloc_type > &  rhs,
const cow_darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1052 of file cow_darray.hpp.

Here is the call graph for this function:

◆ operator<() [2/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 989 of file cow_iterator.hpp.

◆ operator<() [3/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 994 of file cow_iterator.hpp.

◆ operator<() [4/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator< ( const cow_vector< Value_type, Alloc_type > &  rhs,
const cow_vector< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 675 of file cow_vector.hpp.

Here is the call graph for this function:

◆ operator<() [5/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator< ( const darray< Value_type, Alloc_type > &  rhs,
const darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1178 of file darray.hpp.

Here is the call graph for this function:

◆ operator<<() [1/5]

template<typename Value_type , typename Alloc_type >
std::ostream& jau::operator<< ( std::ostream &  out,
const cow_darray< Value_type, Alloc_type > &  c 
)

Definition at line 1029 of file cow_darray.hpp.

Here is the call graph for this function:

◆ operator<<() [2/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
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.

◆ operator<<() [3/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
std::ostream& jau::operator<< ( std::ostream &  out,
const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &  c 
)

Definition at line 944 of file cow_iterator.hpp.

Here is the call graph for this function:

◆ operator<<() [4/5]

template<typename Value_type , typename Alloc_type >
std::ostream& jau::operator<< ( std::ostream &  out,
const cow_vector< Value_type, Alloc_type > &  c 
)

Definition at line 652 of file cow_vector.hpp.

Here is the call graph for this function:

◆ operator<<() [5/5]

template<typename Value_type , typename Alloc_type >
std::ostream& jau::operator<< ( std::ostream &  out,
const darray< Value_type, Alloc_type > &  c 
)

Definition at line 1157 of file darray.hpp.

Here is the call graph for this function:

◆ operator<=() [1/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator<= ( const cow_darray< Value_type, Alloc_type > &  rhs,
const cow_darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1065 of file cow_darray.hpp.

◆ operator<=() [2/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 979 of file cow_iterator.hpp.

◆ operator<=() [3/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 984 of file cow_iterator.hpp.

◆ operator<=() [4/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator<= ( const cow_vector< Value_type, Alloc_type > &  rhs,
const cow_vector< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 688 of file cow_vector.hpp.

◆ operator<=() [5/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator<= ( const darray< Value_type, Alloc_type > &  rhs,
const darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1186 of file darray.hpp.

◆ operator==() [1/9]

template<class T1 , class T2 >
bool jau::operator== ( const callocator< T1 > &  lhs,
const callocator< T2 > &  rhs 
)
noexcept
Examples
test_functiondef01.cpp.

Definition at line 142 of file callocator.hpp.

◆ operator==() [2/9]

template<class T1 , class T2 >
bool jau::operator== ( const counting_allocator< T1 > &  lhs,
const counting_allocator< T2 > &  rhs 
)
noexcept

Definition at line 212 of file counting_allocator.hpp.

◆ operator==() [3/9]

template<class T1 , class T2 >
bool jau::operator== ( const counting_callocator< T1 > &  lhs,
const counting_callocator< T2 > &  rhs 
)
noexcept

Definition at line 227 of file counting_callocator.hpp.

◆ operator==() [4/9]

template<typename Value_type , typename Alloc_type >
bool jau::operator== ( const cow_darray< Value_type, Alloc_type > &  rhs,
const cow_darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1038 of file cow_darray.hpp.

Here is the call graph for this function:

◆ operator==() [5/9]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 959 of file cow_iterator.hpp.

◆ operator==() [6/9]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 969 of file cow_iterator.hpp.

◆ operator==() [7/9]

template<typename Value_type , typename Alloc_type >
bool jau::operator== ( const cow_vector< Value_type, Alloc_type > &  rhs,
const cow_vector< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 661 of file cow_vector.hpp.

Here is the call graph for this function:

◆ operator==() [8/9]

template<typename Value_type , typename Alloc_type >
bool jau::operator== ( const darray< Value_type, Alloc_type > &  rhs,
const darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1166 of file darray.hpp.

Here is the call graph for this function:

◆ operator==() [9/9]

constexpr bool jau::operator== ( const TypeTraitGroup  lhs,
const TypeTraitGroup  rhs 
)
constexprnoexcept

Definition at line 65 of file type_traits_queries.hpp.

Here is the call graph for this function:

◆ operator>() [1/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator> ( const cow_darray< Value_type, Alloc_type > &  rhs,
const cow_darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1061 of file cow_darray.hpp.

◆ operator>() [2/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 1009 of file cow_iterator.hpp.

◆ operator>() [3/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 1014 of file cow_iterator.hpp.

◆ operator>() [4/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator> ( const cow_vector< Value_type, Alloc_type > &  rhs,
const cow_vector< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 684 of file cow_vector.hpp.

◆ operator>() [5/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator> ( const darray< Value_type, Alloc_type > &  rhs,
const darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1182 of file darray.hpp.

◆ operator>=() [1/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator>= ( const cow_darray< Value_type, Alloc_type > &  rhs,
const cow_darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1069 of file cow_darray.hpp.

◆ operator>=() [2/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 999 of file cow_iterator.hpp.

◆ operator>=() [3/5]

template<typename Storage_type , typename Storage_ref_type , typename CoW_container >
constexpr bool jau::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 
)
constexprnoexcept

Definition at line 1004 of file cow_iterator.hpp.

◆ operator>=() [4/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator>= ( const cow_vector< Value_type, Alloc_type > &  rhs,
const cow_vector< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 692 of file cow_vector.hpp.

◆ operator>=() [5/5]

template<typename Value_type , typename Alloc_type >
bool jau::operator>= ( const darray< Value_type, Alloc_type > &  rhs,
const darray< Value_type, Alloc_type > &  lhs 
)
inline

Definition at line 1190 of file darray.hpp.

◆ operator^()

constexpr TypeTraitGroup jau::operator^ ( const TypeTraitGroup  lhs,
const TypeTraitGroup  rhs 
)
constexprnoexcept

Definition at line 56 of file type_traits_queries.hpp.

Here is the call graph for this function:

◆ operator|()

constexpr TypeTraitGroup jau::operator| ( const TypeTraitGroup  lhs,
const TypeTraitGroup  rhs 
)
constexprnoexcept

Definition at line 59 of file type_traits_queries.hpp.

Here is the call graph for this function:

◆ PLAIN_PRINT()

void jau::PLAIN_PRINT ( const bool  printPrefix,
const char *  format,
  ... 
)
noexcept

Use for unconditional plain messages, prefix '[elapsed_time] ' if printPrefix == true.

Definition at line 176 of file debug.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pointer_cast()

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> jau::pointer_cast ( const Source &  src)
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.

Template Parameters
Destthe target pointer type
Sourcethe source pointer argument type
Parameters
srcthe pointer to convert to Dest pointer type
Returns
the converted Dest pointer type value
See also
jau::has_builtin_bit_cast
is_builtin_bit_cast_available()
bit_cast()

Definition at line 302 of file cpp_lang_util.hpp.

Here is the call graph for this function:

◆ print_backtrace()

void jau::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().

Parameters
skip_anon_framesif true, skip all frames w/o proc-name
max_framesnumber of stack frames to be printed or -1 for unlimited, defaults to -1
skip_framesnumber of stack frames to skip, default is two frames for this function and for get_backtrace().
See also
get_backtrace()

Definition at line 91 of file debug.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_native_caught_exception_fwd2java() [1/3]

void jau::print_native_caught_exception_fwd2java ( const char *  cmsg,
const char *  file,
int  line 
)

◆ print_native_caught_exception_fwd2java() [2/3]

void jau::print_native_caught_exception_fwd2java ( const std::exception &  e,
const char *  file,
int  line 
)
Here is the caller graph for this function:

◆ print_native_caught_exception_fwd2java() [3/3]

void jau::print_native_caught_exception_fwd2java ( const std::string &  msg,
const char *  file,
int  line 
)

◆ printSharedPtrList()

template<class List >
void jau::printSharedPtrList ( std::string  prefix,
List &  list 
)
inlinenoexcept

Definition at line 169 of file debug.hpp.

◆ put_uint128() [1/2]

constexpr void jau::put_uint128 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint128_t v 
)
constexprnoexcept

Definition at line 649 of file byte_util.hpp.

Here is the caller graph for this function:

◆ put_uint128() [2/2]

constexpr void jau::put_uint128 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint128_t v,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 653 of file byte_util.hpp.

Here is the call graph for this function:

◆ put_uint16() [1/2]

constexpr void jau::put_uint16 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint16_t  v 
)
constexprnoexcept

Definition at line 561 of file byte_util.hpp.

Here is the caller graph for this function:

◆ put_uint16() [2/2]

constexpr void jau::put_uint16 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint16_t  v,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 573 of file byte_util.hpp.

Here is the call graph for this function:

◆ put_uint192() [1/2]

constexpr void jau::put_uint192 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint192_t v 
)
constexprnoexcept

Definition at line 666 of file byte_util.hpp.

Here is the caller graph for this function:

◆ put_uint192() [2/2]

constexpr void jau::put_uint192 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint192_t v,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 670 of file byte_util.hpp.

Here is the call graph for this function:

◆ put_uint256() [1/2]

constexpr void jau::put_uint256 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint256_t v 
)
constexprnoexcept

Definition at line 683 of file byte_util.hpp.

Here is the caller graph for this function:

◆ put_uint256() [2/2]

constexpr void jau::put_uint256 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint256_t v,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 687 of file byte_util.hpp.

Here is the call graph for this function:

◆ put_uint32() [1/2]

constexpr void jau::put_uint32 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint32_t  v 
)
constexprnoexcept

Definition at line 615 of file byte_util.hpp.

Here is the caller graph for this function:

◆ put_uint32() [2/2]

constexpr void jau::put_uint32 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint32_t  v,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 619 of file byte_util.hpp.

Here is the call graph for this function:

◆ put_uint64() [1/2]

constexpr void jau::put_uint64 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint64_t &  v 
)
constexprnoexcept

Definition at line 632 of file byte_util.hpp.

Here is the caller graph for this function:

◆ put_uint64() [2/2]

constexpr void jau::put_uint64 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint64_t &  v,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 636 of file byte_util.hpp.

Here is the call graph for this function:

◆ put_uint8()

constexpr void jau::put_uint8 ( uint8_t *  buffer,
nsize_t const  byte_offset,
const uint8_t  v 
)
constexprnoexcept

Definition at line 536 of file byte_util.hpp.

◆ put_value() [1/2]

template<typename T >
constexpr std::enable_if_t< std::is_standard_layout_v<T>, void> jau::put_value ( uint8_t *  buffer,
nsize_t const  byte_offset,
const T &  v 
)
constexprnoexcept
Examples
test_basictypeconv.cpp.

Definition at line 711 of file byte_util.hpp.

Here is the caller graph for this function:

◆ put_value() [2/2]

template<typename T >
constexpr std::enable_if_t< std::is_standard_layout_v<T>, void> jau::put_value ( uint8_t *  buffer,
nsize_t const  byte_offset,
const T &  v,
const bool  littleEndian 
)
constexprnoexcept

Definition at line 722 of file byte_util.hpp.

Here is the call graph for this function:

◆ raise_java_exception() [1/12]

void jau::raise_java_exception ( JNIEnv *  env,
const jau::IllegalArgumentException e,
const char *  file,
int  line 
)

◆ raise_java_exception() [2/12]

void jau::raise_java_exception ( JNIEnv *  env,
const jau::IllegalStateException e,
const char *  file,
int  line 
)

◆ raise_java_exception() [3/12]

void jau::raise_java_exception ( JNIEnv *  env,
const jau::IndexOutOfBoundsException e,
const char *  file,
int  line 
)

◆ raise_java_exception() [4/12]

void jau::raise_java_exception ( JNIEnv *  env,
const jau::InternalError e,
const char *  file,
int  line 
)

◆ raise_java_exception() [5/12]

void jau::raise_java_exception ( JNIEnv *  env,
const jau::NullPointerException e,
const char *  file,
int  line 
)

◆ raise_java_exception() [6/12]

void jau::raise_java_exception ( JNIEnv *  env,
const jau::OutOfMemoryError e,
const char *  file,
int  line 
)

◆ raise_java_exception() [7/12]

void jau::raise_java_exception ( JNIEnv *  env,
const jau::RuntimeException e,
const char *  file,
int  line 
)

◆ raise_java_exception() [8/12]

void jau::raise_java_exception ( JNIEnv *  env,
const jau::UnsupportedOperationException e,
const char *  file,
int  line 
)

◆ raise_java_exception() [9/12]

void jau::raise_java_exception ( JNIEnv *  env,
const std::bad_alloc &  e,
const char *  file,
int  line 
)

◆ raise_java_exception() [10/12]

void jau::raise_java_exception ( JNIEnv *  env,
const std::exception &  e,
const char *  file,
int  line 
)
Here is the caller graph for this function:

◆ raise_java_exception() [11/12]

void jau::raise_java_exception ( JNIEnv *  env,
const std::invalid_argument &  e,
const char *  file,
int  line 
)

◆ raise_java_exception() [12/12]

void jau::raise_java_exception ( JNIEnv *  env,
const std::runtime_error &  e,
const char *  file,
int  line 
)

◆ rethrow_and_raise_java_exception_jauimpl()

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.

◆ search_class() [1/3]

jclass jau::search_class ( JNIEnv *  env,
const char *  clazz_name 
)
Here is the caller graph for this function:

◆ search_class() [2/3]

jclass jau::search_class ( JNIEnv *  env,
JavaUplink object 
)
Here is the caller graph for this function:

◆ search_class() [3/3]

jclass jau::search_class ( JNIEnv *  env,
jobject  obj 
)

◆ search_field()

jfieldID jau::search_field ( JNIEnv *  env,
jclass  clazz,
const char *  field_name,
const char *  type,
bool  is_static 
)
Here is the caller graph for this function:

◆ search_method()

jmethodID jau::search_method ( JNIEnv *  env,
jclass  clazz,
const char *  method_name,
const char *  prototype,
bool  is_static 
)
Here is the caller graph for this function:

◆ set_bit_uint32()

void jau::set_bit_uint32 ( const uint8_t  nr,
uint32_t &  mask 
)
inline

Definition at line 147 of file basic_types.hpp.

◆ set_bit_uint64()

void jau::set_bit_uint64 ( const uint8_t  nr,
uint64_t &  mask 
)
inline

Definition at line 165 of file basic_types.hpp.

◆ setInstance()

template<typename T >
void jau::setInstance ( JNIEnv *  env,
jobject  obj,
T *  t 
)

Definition at line 286 of file helper_jni.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setJavaUplinkObject()

template<typename T >
void jau::setJavaUplinkObject ( JNIEnv *  env,
jobject  obj,
T *  t 
)

Definition at line 228 of file helper_jni.hpp.

Here is the call graph for this function:

◆ setObjectRef()

template<typename T >
void jau::setObjectRef ( JNIEnv *  env,
jobject  obj,
T *  t,
const char *  field_name 
)

Definition at line 260 of file helper_jni.hpp.

Here is the call graph for this function:

◆ sign()

template<typename T >
constexpr snsize_t jau::sign ( const T  x)
constexprnoexcept

Returns the value of the sign function.

-1 for x < 0
 0 for x = 0
 1 for x > 0

Implementation is type safe.

Template Parameters
Tan integral number type
Parameters
xthe integral number
Returns
function result

Definition at line 55 of file int_math.hpp.

Here is the caller graph for this function:

◆ swap() [1/3]

template<typename Value_type , typename Alloc_type >
void jau::swap ( cow_darray< Value_type, Alloc_type > &  rhs,
cow_darray< Value_type, Alloc_type > &  lhs 
)
inlinenoexcept

Definition at line 1073 of file cow_darray.hpp.

Here is the caller graph for this function:

◆ swap() [2/3]

template<typename Value_type , typename Alloc_type >
void jau::swap ( cow_vector< Value_type, Alloc_type > &  rhs,
cow_vector< Value_type, Alloc_type > &  lhs 
)
inlinenoexcept

Definition at line 696 of file cow_vector.hpp.

◆ swap() [3/3]

template<typename Value_type , typename Alloc_type >
void jau::swap ( darray< Value_type, Alloc_type > &  rhs,
darray< Value_type, Alloc_type > &  lhs 
)
inlinenoexcept

Definition at line 1194 of file darray.hpp.

Here is the caller graph for this function:

◆ test_bit_uint32()

uint32_t jau::test_bit_uint32 ( const uint8_t  nr,
const uint32_t  mask 
)
inline

Definition at line 159 of file basic_types.hpp.

◆ test_bit_uint64()

uint64_t jau::test_bit_uint64 ( const uint8_t  nr,
const uint64_t  mask 
)
inline

Definition at line 177 of file basic_types.hpp.

◆ to_decstring()

template<class value_type , std::enable_if_t< std::is_integral_v< value_type >, bool > = true>
std::string jau::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.

Template Parameters
Tan integral integer type
Parameters
vthe integral integer value
separatorif not 0, use as separation character, otherwise no separation characters are being used
widththe minimum number of characters to be printed. Add padding with blank space if result is shorter.
Returns
the string representation of the integral integer value
Examples
test_cow_darray_perf01.cpp, test_cow_iterator_01.cpp, and test_intdecstring01.cpp.

Definition at line 143 of file string_util.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_hexstring()

template<class value_type , std::enable_if_t< std::is_pointer_v< value_type >, bool > = true>
std::string jau::to_hexstring ( value_type const &  v)
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.

Template Parameters
value_typea pointer type
Parameters
vthe pointer of given pointer type
Returns
the hex-string representation of the value
See also
bytesHexString()
Template Parameters
value_typea standard layout value type
Parameters
vthe value of given standard layout type
Returns
the hex-string representation of the value
See also
bytesHexString()
Examples
dbt_scanner00.cpp, dbt_scanner01.cpp, dbt_scanner10.cpp, and test_basictypeconv.cpp.

Definition at line 104 of file string_util.hpp.

Here is the call graph for this function:

◆ to_string() [1/2]

PRAGMA_DISABLE_WARNING_POP constexpr_cxx20 std::string jau::to_string ( const endian v)
noexcept

Return std::string representation of the given jau::endian.

Parameters
vthe jau::endian value
Returns
the std::string representation
Examples
test_basictypeconv.cpp, test_cow_darray_01.cpp, test_functiondef01.cpp, test_intdecstring01.cpp, test_lfringbuffer01.cpp, test_lfringbuffer11.cpp, test_mm_sc_drf_00.cpp, and test_mm_sc_drf_01.cpp.

Definition at line 198 of file byte_util.hpp.

◆ to_string() [2/2]

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 jau::to_string ( const value_type &  ref)

Definition at line 180 of file string_util.hpp.

◆ trimCopy()

std::string jau::trimCopy ( const std::string &  s)
noexcept

trim copy

Definition at line 86 of file basic_types.cpp.

Here is the call graph for this function:

◆ trimInPlace()

void jau::trimInPlace ( std::string &  s)
noexcept

trim in place

Definition at line 77 of file basic_types.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WARN_PRINT_impl()

void jau::WARN_PRINT_impl ( const char *  func,
const char *  file,
const int  line,
const char *  format,
  ... 
)
noexcept

Definition at line 156 of file debug.cpp.

Here is the call graph for this function:

◆ WARN_PRINTv()

void jau::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: '.

Definition at line 149 of file debug.cpp.

Here is the call graph for this function:

◆ WORDY_PRINT_impl()

void jau::WORDY_PRINT_impl ( const char *  format,
  ... 
)
noexcept

Definition at line 106 of file debug.cpp.

Here is the call graph for this function:

Variable Documentation

◆ has_builtin_bit_cast_v

template<typename Dummy_type >
constexpr bool jau::has_builtin_bit_cast_v = has_builtin_bit_cast<Dummy_type>::value
constexpr

Value access of has_builtin_bit_cast type trait for convenience .

Template Parameters
Dummy_typejust to make template SFINAE happy
See also
has_builtin_bit_cast

Definition at line 194 of file cpp_lang_util.hpp.

◆ has_endian_big_v

template<typename Dummy_type >
constexpr bool jau::has_endian_big_v = has_endian_big<Dummy_type>::value
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.

Template Parameters
Dummy_typejust to make template SFINAE happy

Definition at line 290 of file byte_util.hpp.

◆ has_endian_little_v

template<typename Dummy_type >
constexpr bool jau::has_endian_little_v = has_endian_little<Dummy_type>::value
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.

Template Parameters
Dummy_typejust to make template SFINAE happy

Definition at line 270 of file byte_util.hpp.

◆ has_member_of_pointer_v

template<typename _Tp >
constexpr bool jau::has_member_of_pointer_v = has_member_of_pointer<_Tp>::value
inlineconstexpr

Definition at line 313 of file type_traits_queries.hpp.

◆ has_to_string_v

template<typename _Tp >
constexpr bool jau::has_to_string_v = has_to_string<_Tp>::value
inlineconstexpr

Definition at line 304 of file type_traits_queries.hpp.

◆ has_toString_v

template<typename _Tp >
constexpr bool jau::has_toString_v = has_toString<_Tp>::value
inlineconstexpr

Definition at line 301 of file type_traits_queries.hpp.

◆ VERSION

const char* jau::VERSION

◆ VERSION_API

const char* jau::VERSION_API

◆ VERSION_SHORT

const char* jau::VERSION_SHORT