diff options
32 files changed, 298 insertions, 68 deletions
diff --git a/Doxyfile.cpp.in b/Doxyfile.cpp.in index 7e4473f..65ceed7 100644 --- a/Doxyfile.cpp.in +++ b/Doxyfile.cpp.in @@ -415,13 +415,13 @@ EXTRACT_ALL = YES # be included in the documentation. # The default value is: NO. -EXTRACT_PRIVATE = YES +EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. -EXTRACT_PACKAGE = YES +EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. @@ -544,7 +544,7 @@ INLINE_INFO = YES # name. If set to NO, the members will appear in declaration order. # The default value is: YES. -SORT_MEMBER_DOCS = YES +SORT_MEMBER_DOCS = NO # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member @@ -552,7 +552,7 @@ SORT_MEMBER_DOCS = YES # this will also influence the order of the classes in the class list. # The default value is: NO. -SORT_BRIEF_DOCS = NO +SORT_BRIEF_DOCS = YES # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and @@ -564,14 +564,14 @@ SORT_BRIEF_DOCS = NO # detailed member documentation. # The default value is: NO. -SORT_MEMBERS_CTORS_1ST = NO +SORT_MEMBERS_CTORS_1ST = YES # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. -SORT_GROUP_NAMES = NO +SORT_GROUP_NAMES = YES # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will @@ -2217,7 +2217,7 @@ INCLUDED_BY_GRAPH = YES # The default value is: NO. # This tag requires that the tag HAVE_DOT is set to YES. -CALL_GRAPH = YES +CALL_GRAPH = NO # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller # dependency graph for every global function or class method. diff --git a/Doxyfile.java.in b/Doxyfile.java.in index 9b66054..9ddbd03 100644 --- a/Doxyfile.java.in +++ b/Doxyfile.java.in @@ -571,7 +571,7 @@ SORT_MEMBERS_CTORS_1ST = NO # appear in their defined order. # The default value is: NO. -SORT_GROUP_NAMES = NO +SORT_GROUP_NAMES = YES # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will @@ -13,7 +13,8 @@ This project was extracted from [Direct-BT](https://jausoft.com/cgit/direct_bt.g ## API Documentation Up to date API documentation can be found: -* [C++ API Doc](https://jausoft.com/projects/jaulib/build/documentation/cpp/html/index.html). +* [C++ API Doc](https://jausoft.com/projects/jaulib/build/documentation/cpp/html/index.html) + - Grouped [C++ Modules](https://jausoft.com/projects/jaulib/build/documentation/cpp/html/modules.html) * [Java API Doc](https://jausoft.com/projects/jaulib/build/documentation/java/html/index.html). diff --git a/include/jau/basic_algos.hpp b/include/jau/basic_algos.hpp index a252ade..10efa69 100644 --- a/include/jau/basic_algos.hpp +++ b/include/jau/basic_algos.hpp @@ -32,6 +32,11 @@ #include <jau/cow_iterator.hpp> namespace jau { + /** @defgroup Algorithms Basic Algorithms + * Basic algorithms. + * + * @{ + */ /** * Call on release allows the user to pass a function @@ -370,6 +375,8 @@ namespace jau { return f; // implicit move since C++11 } + /**@}*/ + } // namespace jau #endif /* JAU_BASIC_ALGOS_HPP_ */ diff --git a/include/jau/basic_types.hpp b/include/jau/basic_types.hpp index dae12e0..df928fa 100644 --- a/include/jau/basic_types.hpp +++ b/include/jau/basic_types.hpp @@ -49,6 +49,8 @@ namespace jau { /** + * \ingroup Fractions + * * Returns current monotonic time since Unix Epoch `00:00:00 UTC on 1970-01-01`. * * Returned fraction_timespec is passing machine precision and range of the underlying API. @@ -78,6 +80,8 @@ namespace jau { fraction_timespec getMonotonicTime() noexcept; /** + * \ingroup Fractions + * * Returns current wall-clock real-time since Unix Epoch `00:00:00 UTC on 1970-01-01`. * * Returned fraction_timespec is passing machine precision and range of the underlying API. @@ -213,6 +217,11 @@ namespace jau { // ************************************************* */ + /** \addtogroup Integrals + * + * @{ + */ + inline void set_bit_uint32(const uint8_t nr, uint32_t &mask) { if( nr > 31 ) { throw IndexOutOfBoundsException(nr, 32, E_FILE_LINE); } @@ -299,6 +308,8 @@ namespace jau { */ uint128_t merge_uint128(uint32_t const uuid32, uint128_t const & base_uuid, nsize_t const uuid32_le_octet_index); + /**@}*/ + } // namespace jau /** \example test_intdecstring01.cpp diff --git a/include/jau/byte_util.hpp b/include/jau/byte_util.hpp index 7c50291..0a33f1d 100644 --- a/include/jau/byte_util.hpp +++ b/include/jau/byte_util.hpp @@ -41,6 +41,13 @@ namespace jau { + /** @defgroup ByteUtils Byte Utilities + * Byte utility functions and types for endian- and bit conversions, + * inclusive alignment handling and general get & put functionality. + * + * @{ + */ + #if defined __has_builtin #if __has_builtin(__builtin_bswap16) #define __has_builtin_bswap16 1 @@ -723,6 +730,8 @@ namespace jau { return get_value(pointer_cast<const packed_t<T>*>( buffer + byte_offset ), littleEndian); } + /**@}*/ + } // namespace jau /** \example test_basictypeconv.cpp diff --git a/include/jau/cow_darray.hpp b/include/jau/cow_darray.hpp index 8c5a0a9..9c8a936 100644 --- a/include/jau/cow_darray.hpp +++ b/include/jau/cow_darray.hpp @@ -45,57 +45,55 @@ namespace jau { + /** \addtogroup DataStructs + * + * @{ + */ + /** * Implementation of a Copy-On-Write (CoW) using jau::darray as the underlying storage, * exposing <i>lock-free</i> read operations using SC-DRF atomic synchronization. - * <p> + * + * This data structure is also supporting \ref Concurrency. + * * This class shall be compliant with <i>C++ named requirements for Container</i>. - * </p> - * <p> + * * The store is owned using a shared reference to the data structure, * allowing its replacement on Copy-On-Write (CoW). - * </p> - * <p> + * * Writing to the store utilizes a mutex lock to avoid data races * on the instances' write operations only, leaving read operations <i>lock-free</i>.<br> * Write operations replace the store reference with a new instance using * jau::sc_atomic_critical to synchronize with read operations. - * </p> - * <p> + * * Reading from the store is <i>lock-free</i> and accesses the store reference using * jau::sc_atomic_critical to synchronizing with write operations. - * </p> - * <p> + * * Immutable storage const_iterators are supported via jau::cow_ro_iterator, * which are constructed <i>lock-free</i>.<br> * jau::cow_ro_iterator holds a snapshot retrieved via jau::cow_darray::snapshot() * until its destruction. - * </p> - * <p> + * * Mutable storage iterators are supported via jau::cow_rw_iterator, * which holds a copy of this CoW storage and locks its write mutex until * jau::cow_rw_iterator::write_back() or its destruction.<br> * After completing all mutable operations but before this iterator's destruction, * the user might want to write back this iterators' storage to this CoW * using jau::cow_rw_iterator::write_back(). - * </p> - * <p> + * * Both, jau::cow_ro_iterator and jau::cow_rw_iterator are harmonized * to work with jau::darray::const_iterator and jau::darray::iterator * for all iterator based operations. - * </p> - * <p> + * * Index operation via ::operator[](size_t) or ::at(size_t) are not supported, * since they would be only valid if value_type itself is a std::shared_ptr * and hence prohibit the destruction of the object if mutating the storage, * e.g. via jau::cow_darray::push_back(). - * </p> - * <p> + * * Custom mutable write operations are also supported via * jau::cow_darray::get_write_mutex(), jau::cow_darray::copy_store() and jau::cow_darray::set_store().<br> * See example in jau::cow_darray::set_store() - * </p> - * <p> + * * To allow data-race free operations using iterators from a potentially mutated CoW, * only one cow_darray::begin() const_iterator or iterator should be retrieved from this CoW * and all further operations shall use its @@ -1194,6 +1192,8 @@ namespace jau { inline void swap(cow_darray<Value_type, Alloc_type>& rhs, cow_darray<Value_type, Alloc_type>& lhs) noexcept { rhs.swap(lhs); } + /**@}*/ + } /* namespace jau */ /** \example test_cow_iterator_01.cpp diff --git a/include/jau/cow_iterator.hpp b/include/jau/cow_iterator.hpp index ed09a61..84d80a3 100644 --- a/include/jau/cow_iterator.hpp +++ b/include/jau/cow_iterator.hpp @@ -39,6 +39,11 @@ namespace jau { + /** \addtogroup DataStructs + * + * @{ + */ + // forward declaration for friendship with cow_rw_iterator template <typename Storage_type, typename Storage_ref_type, typename CoW_container> class cow_ro_iterator; @@ -1049,6 +1054,8 @@ namespace jau { /**************************************************************************************** ****************************************************************************************/ + /**@}*/ + } /* namespace jau */ diff --git a/include/jau/cow_vector.hpp b/include/jau/cow_vector.hpp index 351f14c..a65ff2e 100644 --- a/include/jau/cow_vector.hpp +++ b/include/jau/cow_vector.hpp @@ -45,51 +45,51 @@ namespace jau { + /** \addtogroup DataStructs + * + * @{ + */ + /** * Implementation of a Copy-On-Write (CoW) using std::vector as the underlying storage, * exposing <i>lock-free</i> read operations using SC-DRF atomic synchronization. - * <p> + * + * This data structure is also supporting \ref Concurrency. + * * This class shall be compliant with <i>C++ named requirements for Container</i>. - * </p> - * <p> + * * The vector's store is owned using a shared reference to the data structure, * allowing its replacement on Copy-On-Write (CoW). - * </p> - * <p> + * * Writing to the store utilizes a mutex lock to avoid data races * on the instances' write operations only, leaving read operations <i>lock-free</i>.<br> * Write operations replace the store reference with a new instance using * jau::sc_atomic_critical to synchronize with read operations. - * </p> - * <p> + * * Reading from the store is <i>lock-free</i> and accesses the store reference using * jau::sc_atomic_critical to synchronizing with write operations. - * </p> - * <p> + * * Immutable storage const_iterators are supported via jau::cow_ro_iterator, * which are constructed <i>lock-free</i>.<br> * jau::cow_ro_iterator hold a snapshot retrieved via jau::cow_vector::snapshot() * until its destruction. - * </p> - * <p> + * * Mutable storage iterators are supported via jau::cow_rw_iterator, * which holds a copy of this CoW storage and locks its write mutex until * jau::cow_rw_iterator::write_back() or its destruction.<br> * After completing all mutable operations but before this iterator's destruction, * the user might want to write back this iterators' storage to this CoW * using jau::cow_rw_iterator::write_back(). - * </p> - * <p> + * * Index operation via ::operator[](size_type) or ::at(size_type) are not supported, * since they would be only valid if value_type itself is a std::shared_ptr * and hence prohibit the destruction of the object if mutating the storage, * e.g. via jau::cow_vector::push_back(). - * </p> - * <p> + * * Custom mutable write operations are also supported via * jau::cow_vector::get_write_mutex(), jau::cow_vector::copy_store() and jau::cow_vector::set_store().<br> * See example in jau::cow_vector::set_store() - * </p> + * * See also: * <pre> * - Sequentially Consistent (SC) ordering or SC-DRF (data race free) <https://en.cppreference.com/w/cpp/atomic/memory_order#Sequentially-consistent_ordering> @@ -695,6 +695,9 @@ namespace jau { template<typename Value_type, typename Alloc_type> inline void swap(cow_vector<Value_type, Alloc_type>& rhs, cow_vector<Value_type, Alloc_type>& lhs) noexcept { rhs.swap(lhs); } + + /**@}*/ + } /* namespace jau */ #endif /* JAU_COW_VECTOR_HPP_ */ diff --git a/include/jau/cpp_lang_util.hpp b/include/jau/cpp_lang_util.hpp index 9fc5c1e..179f3b3 100644 --- a/include/jau/cpp_lang_util.hpp +++ b/include/jau/cpp_lang_util.hpp @@ -29,6 +29,12 @@ namespace jau { + /** @defgroup CppLang C++ Language Utilities + * C++ language utilities, language feature alignment, type trails, data alignment and intrinsics. + * + * @{ + */ + /** * `consteval` qualifier replacement for C++20 `consteval`. * @@ -309,6 +315,8 @@ namespace jau { } } + /**@}*/ + } // namespace jau #endif /* CPP_LANG_EXT_HPP_ */ diff --git a/include/jau/cpp_pragma.hpp b/include/jau/cpp_pragma.hpp index 0946416..a55d643 100644 --- a/include/jau/cpp_pragma.hpp +++ b/include/jau/cpp_pragma.hpp @@ -27,6 +27,11 @@ namespace jau { + /** \addtogroup CppLang + * + * @{ + */ + #if defined(_MSC_VER) #define PRAGMA_DISABLE_WARNING_PUSH __pragma(warning( push )) #define PRAGMA_DISABLE_WARNING_POP __pragma(warning( pop )) @@ -64,6 +69,8 @@ namespace jau { #define PRAGMA_DISABLE_WARNING_FORMAT_OVERFLOW #endif + /**@}*/ + } // namespace jau #endif /* CPP_PRAGMA_HPP_ */ diff --git a/include/jau/darray.hpp b/include/jau/darray.hpp index 06d049d..dc7f166 100644 --- a/include/jau/darray.hpp +++ b/include/jau/darray.hpp @@ -59,38 +59,37 @@ namespace jau { #define JAU_DARRAY_PRINTF(...) #endif + /** \addtogroup DataStructs + * + * @{ + */ + /** * Implementation of a dynamic linear array storage, aka vector.<br> * Goals are to support a high-performance CoW dynamic array implementation, jau::cow_darray,<br> * exposing fine grained control over its underlying storage facility.<br> * Further, jau::darray provides high-performance and efficient storage properties on its own. - * <p> + * * This class shall be compliant with <i>C++ named requirements for Container</i>. - * </p> - * <p> + * * API and design differences to std::vector - * <ul> - * <li>jau::darray adds a parameterized <i>growth factor</i> aspect, default to golden ration jau::darray::DEFAULT_GROWTH_FACTOR</li> - * <li><i>capacity</i> control via constructor and operations, related to <i>growth factor</i>.</li> - * <li>Iterator jau::darray::const_iterator .. are harmonized with jau::cow_ro_iterator .. used in jau:cow_darray.</li> - * <li>...</li> - * <li>Custom constructor and operations, supporting a more efficient jau::cow_darray implementation.</li> - * <li>Custom template typename Size_type, defaults to jau::nsize_t.</li> - * <li>...</li> - * <li><b>Removed</b>: size_type x value_type fill operations, e.g. assign, constructor, .... for clarity, since supporting <i>capacity</i>.</li> - * <li>...</li> - * <li><b>TODO</b>: std::initializer_list<T> methods, ctor is provided.</li> - * </ul> - * </p> - * <p> + * - jau::darray adds a parameterized <i>growth factor</i> aspect, default to golden ration jau::darray::DEFAULT_GROWTH_FACTOR + * - <i>capacity</i> control via constructor and operations, related to <i>growth factor</i>. + * - Iterator jau::darray::const_iterator .. are harmonized with jau::cow_ro_iterator .. used in jau:cow_darray. + * - ... + * - Custom constructor and operations, supporting a more efficient jau::cow_darray implementation. + * - Custom template typename Size_type, defaults to jau::nsize_t. + * - ... + * - <b>Removed</b>: size_type x value_type fill operations, e.g. assign, constructor, .... for clarity, since supporting <i>capacity</i>. + * - ... + * - <b>TODO</b>: std::initializer_list<T> methods, ctor is provided. + * * Implementation differences to std::vector and some details - * <ul> - * <li>Using zero overhead <i>value_type*</i> as iterator type.</li> - * <li>...</li> - * <li>Storage is operated on three iterator: <i>begin</i>, <i>end</i> and <i>storage_end</i>.</li> - * <li>Constructs and destructs value_type via <i>placement new</i> within the pre-allocated array capacity. Latter is managed via allocator_type.</li> - * </ul> - * </p> + * - Using zero overhead <i>value_type*</i> as iterator type. + * - ... + * - Storage is operated on three iterator: <i>begin</i>, <i>end</i> and <i>storage_end</i>. + * - Constructs and destructs value_type via <i>placement new</i> within the pre-allocated array capacity. Latter is managed via allocator_type. + * * * @anchor darray_ntt_params * ### Non-Type Template Parameter (NTTP) controlling Value_type memory @@ -1383,6 +1382,8 @@ namespace jau { template< class T > struct is_darray_type<T, std::void_t<typename T::darray_tag>> : std::true_type { }; + /**@}*/ + } /* namespace jau */ #endif /* JAU_DYN_ARRAY_HPP_ */ diff --git a/include/jau/dfa_utf8_decode.hpp b/include/jau/dfa_utf8_decode.hpp index 308858e..efe6de5 100644 --- a/include/jau/dfa_utf8_decode.hpp +++ b/include/jau/dfa_utf8_decode.hpp @@ -35,9 +35,19 @@ #include <cinttypes> namespace jau { + /** + * \ingroup ByteUtils + * + * @param state + * @param codep + * @param byte_value + * @return + */ uint32_t dfa_utf8_decode(uint32_t & state, uint32_t & codep, const uint32_t byte_value); /** + * \ingroup ByteUtils + * * Returns all valid consecutive UTF-8 characters within buffer * in the range up to buffer_size or until EOS. * <p> diff --git a/include/jau/eui48.hpp b/include/jau/eui48.hpp index 433a309..78d7ccf 100644 --- a/include/jau/eui48.hpp +++ b/include/jau/eui48.hpp @@ -35,6 +35,12 @@ #include <jau/basic_types.hpp> #include <jau/packed_attribute.hpp> +/** @defgroup NetUtils Network utilities and types + * Networking types and functionality. + * + * @{ + */ + namespace jau { /** @@ -400,4 +406,6 @@ namespace std }; } +/**@}*/ + #endif /* JAU_EUI48_HPP_ */ diff --git a/include/jau/float_math.hpp b/include/jau/float_math.hpp index 4cac53c..c410712 100644 --- a/include/jau/float_math.hpp +++ b/include/jau/float_math.hpp @@ -30,6 +30,11 @@ #include <algorithm> namespace jau { + /** @defgroup Floats Float support + * Float data types and arithmetic + * @{ + */ + /** // ************************************************* // ************************************************* @@ -106,6 +111,8 @@ namespace jau { diff < std::numeric_limits<T>::min(); // subnormal limit } + /**@}*/ + } // namespace jau #endif /* JAU_BASIC_FLOAT_MATH_HPP_ */ diff --git a/include/jau/fraction_type.hpp b/include/jau/fraction_type.hpp index 01a6c1a..f9079f7 100644 --- a/include/jau/fraction_type.hpp +++ b/include/jau/fraction_type.hpp @@ -46,6 +46,17 @@ namespace jau { // Remember: constexpr specifier used in a function or static data member (since C++17) declaration implies inline. + /** @defgroup fractions Fractions for time and more + * Fraction type and arithmetic support + * inclusive its utilization for time without loss of precision nor range. + * + * General timing functionality like sleep_until(), sleep_for(), + * wait_until() and wait_for() are supported, + * completed with getMonotonicClock() and getWallTimeClock(). + * + * @{ + */ + /** * Fraction template type using integral values, evaluated at runtime. * @@ -1156,4 +1167,6 @@ namespace std { } } // namespace std + /**@}*/ + #endif /* JAU_FRACTION_TYPE_HPP_ */ diff --git a/include/jau/function_def.hpp b/include/jau/function_def.hpp index c2dcb54..e3ff889 100644 --- a/include/jau/function_def.hpp +++ b/include/jau/function_def.hpp @@ -37,6 +37,12 @@ namespace jau { + /** @defgroup FunctionPtr Function pointer support + * Function pointer support inclusive capturing lambdas. + * + * @{ + */ + enum class FunctionType : int { Null = 0, Class = 1, @@ -470,6 +476,8 @@ namespace jau { return FunctionDef<R, A...>( new StdInvocationFunc<R, A...>(id) ); } + /**@}*/ + } // namespace jau /** \example test_functiondef01.cpp diff --git a/include/jau/int_math.hpp b/include/jau/int_math.hpp index 5259569..fbc4ef4 100644 --- a/include/jau/int_math.hpp +++ b/include/jau/int_math.hpp @@ -35,6 +35,11 @@ namespace jau { #define JAU_USE_BUILDIN_OVERFLOW 1 + /** \addtogroup Integrals + * + * @{ + */ + /** // ************************************************* // ************************************************* @@ -373,6 +378,8 @@ namespace jau { return digits10<T>(x, jau::sign<T>(x), sign_is_digit); } + /**@}*/ + } // namespace jau #endif /* JAU_BASIC_INT_MATH_HPP_ */ diff --git a/include/jau/int_types.hpp b/include/jau/int_types.hpp index 7a6c697..21984df 100644 --- a/include/jau/int_types.hpp +++ b/include/jau/int_types.hpp @@ -32,6 +32,11 @@ #include <jau/packed_attribute.hpp> namespace jau { + /** @defgroup Integrals Integral type support + * Integral integer data types and arithmetic + * @{ + */ + /** * Natural 'size_t' alternative using `uint_fast32_t` as its natural sized type. * <p> @@ -166,6 +171,8 @@ namespace jau { constexpr jau::nsize_t operator ""_unz(unsigned long long int __v) { return (jau::nsize_t)__v; } } + /**@}*/ + } // namespace jau /** \example test_basictypeconv.cpp diff --git a/include/jau/java_uplink.hpp b/include/jau/java_uplink.hpp index 8baca17..1801ebd 100644 --- a/include/jau/java_uplink.hpp +++ b/include/jau/java_uplink.hpp @@ -33,6 +33,12 @@ namespace jau { + /** @defgroup JavaVM Java Virtual Machine + * Java virtual machine support, helping accessing the JVM and converting data types. + * + * @{ + */ + /** * Pure virtual JavaAnon, hiding Java JNI details from API, * to be implemented by JNI module. @@ -97,6 +103,8 @@ namespace jau { } }; + /**@}*/ + } /* namespace jau */ diff --git a/include/jau/jni/helper_jni.hpp b/include/jau/jni/helper_jni.hpp index e8807e1..664c75e 100644 --- a/include/jau/jni/helper_jni.hpp +++ b/include/jau/jni/helper_jni.hpp @@ -43,6 +43,11 @@ namespace jau { + /** \addtogroup JavaVM + * + * @{ + */ + // // C++ <-> java exceptions // @@ -534,6 +539,9 @@ namespace jau { return result; } + /**@}*/ + + } // namespace direct_bt #endif /* JAU_HELPER_JNI_HPP_ */ diff --git a/include/jau/jni/jni_mem.hpp b/include/jau/jni/jni_mem.hpp index 12ee82e..c6ad583 100644 --- a/include/jau/jni/jni_mem.hpp +++ b/include/jau/jni/jni_mem.hpp @@ -34,6 +34,11 @@ #include <jau/basic_types.hpp> +/** \addtogroup JavaVM + * + * @{ + */ + extern JavaVM* vm; @@ -195,5 +200,7 @@ public: bool getIsCopy() const { return isCopy; } }; +/**@}*/ + #endif /* JAU_JNIMEM__HPP_ */ diff --git a/include/jau/latch.hpp b/include/jau/latch.hpp index d2a6fae..1887902 100644 --- a/include/jau/latch.hpp +++ b/include/jau/latch.hpp @@ -35,6 +35,11 @@ namespace jau { + /** \addtogroup Concurrency + * + * @{ + */ + /** * Inspired by std::latch of C++20 * @@ -247,6 +252,8 @@ namespace jau { } }; + /**@}*/ + } /* namespace jau */ #endif /* JAU_LATCH_HPP_ */ diff --git a/include/jau/octets.hpp b/include/jau/octets.hpp index 883111a..2e3b325 100644 --- a/include/jau/octets.hpp +++ b/include/jau/octets.hpp @@ -50,6 +50,11 @@ namespace jau { + /** \addtogroup ByteUtils + * + * @{ + */ + /** * Transient read only and endian aware octet data, i.e. non persistent passthrough, owned by caller. * @@ -922,6 +927,8 @@ namespace jau { } }; + /**@}*/ + } /* namespace jau */ diff --git a/include/jau/ordered_atomic.hpp b/include/jau/ordered_atomic.hpp index ab411a1..60a3967 100644 --- a/include/jau/ordered_atomic.hpp +++ b/include/jau/ordered_atomic.hpp @@ -37,6 +37,24 @@ namespace jau { # define CXX_ALWAYS_INLINE inline __attribute__((__always_inline__)) #endif +/** \addtogroup Concurrency + * + * @{ + */ +/**@}*/ + +/** @defgroup Concurrency Concurrency + * Concurrency support to avoid data races and help to synchronize access. + * + * Notable, the following data structures from \ref DataStructs + * are also supporting concurrency: + * - \ref ringbuffer + * - cow_darray + * - cow_vector + * + * @{ + */ + /** * 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. @@ -335,6 +353,8 @@ template <typename _Tp, std::memory_order _MO> struct ordered_atomic : private s sc_atomic_critical& operator=(const sc_atomic_critical&) volatile = delete; }; + /**@}*/ + } /* namespace jau */ /** \example test_mm_sc_drf_00.cpp diff --git a/include/jau/packed_attribute.hpp b/include/jau/packed_attribute.hpp index bd9136d..299a2fe 100644 --- a/include/jau/packed_attribute.hpp +++ b/include/jau/packed_attribute.hpp @@ -26,6 +26,11 @@ #ifndef PACKED_ATTRIBUTE_HPP_ #define PACKED_ATTRIBUTE_HPP_ +/** \addtogroup CppLang + * + * @{ + */ + /** packed__: lead in macro, requires __packed lead out as well. Consider using __pack(...). */ #ifndef packed__ #ifdef _MSC_VER @@ -53,6 +58,8 @@ #endif #endif +namespace jau { + /** * Safe access to a pointer cast from unaligned memory via __packed__ attribute, * i.e. utilizing compiler generated safe load and store operations. @@ -64,5 +71,8 @@ T store; } ) ; +} // namespace jau + +/**@}*/ #endif /* PACKED_ATTRIBUTE_HPP_ */ diff --git a/include/jau/ringbuffer.hpp b/include/jau/ringbuffer.hpp index 7672ece..fac1846 100644 --- a/include/jau/ringbuffer.hpp +++ b/include/jau/ringbuffer.hpp @@ -56,11 +56,23 @@ namespace jau { #define _DEBUG_PRINT(...) #endif +/** @defgroup DataStructs Data structures and types + * Data structures and types, notably + * - \ref ringbuffer + * - \ref darray + * - cow_darray + * - cow_vector + * + * @{ + */ + /** * Ring buffer implementation, a.k.a circular buffer, * exposing <i>lock-free</i> * {@link #get() get*(..)} and {@link #put(Object) put*(..)} methods. * + * This data structure is also supporting \ref Concurrency. + * * Implementation utilizes the <i>Always Keep One Slot Open</i>, * hence implementation maintains an internal array of `capacity` <i>plus one</i>! * @@ -1477,6 +1489,8 @@ class ringbuffer { } }; +/**@}*/ + } /* namespace jau */ /** \example test_lfringbuffer01.cpp diff --git a/include/jau/service_runner.hpp b/include/jau/service_runner.hpp index 3c0b858..c02647b 100644 --- a/include/jau/service_runner.hpp +++ b/include/jau/service_runner.hpp @@ -43,6 +43,11 @@ namespace jau { + /** \addtogroup Concurrency + * + * @{ + */ + /** * Service runner, a reusable dedicated thread performing custom user services. */ @@ -270,6 +275,7 @@ namespace jau { std::string toString() const noexcept; }; + /**@}*/ } // namespace jau diff --git a/include/jau/simple_timer.hpp b/include/jau/simple_timer.hpp index 4e1c8a7..5149198 100644 --- a/include/jau/simple_timer.hpp +++ b/include/jau/simple_timer.hpp @@ -37,6 +37,11 @@ namespace jau { + /** \addtogroup Concurrency + * + * @{ + */ + /** * A simple timer for timeout and interval applications, * using one dedicated service_runner thread per instance. @@ -131,6 +136,8 @@ namespace jau { bool stop() noexcept { return timer_service.stop(); } }; + /**@}*/ + } /* namespace jau */ #endif /* JAU_SIMPLE_TIMER_HPP_ */ diff --git a/include/jau/string_util.hpp b/include/jau/string_util.hpp index f7084e1..6673171 100644 --- a/include/jau/string_util.hpp +++ b/include/jau/string_util.hpp @@ -40,6 +40,12 @@ namespace jau { + /** @defgroup StringUtils String Utilities + * String utilities for type conversion and manipulation. + * + * @{ + */ + /** * Returns a C++ String taken from buffer with maximum length of min(max_len, max_len). * <p> @@ -251,6 +257,8 @@ namespace jau { return "jau::to_string<T> not available for "+type_cue<value_type>::print("unknown", TypeTraitGroup::ALL); } + /**@}*/ + } // namespace jau /** \example test_intdecstring01.cpp diff --git a/include/jau/type_traits_queries.hpp b/include/jau/type_traits_queries.hpp index e321341..aac28ec 100644 --- a/include/jau/type_traits_queries.hpp +++ b/include/jau/type_traits_queries.hpp @@ -37,6 +37,11 @@ namespace jau { + /** \addtogroup CppLang + * + * @{ + */ + // Author: Sven Gothel /** @@ -354,6 +359,8 @@ namespace jau { template <typename _Tp> inline constexpr bool has_member_of_pointer_v = has_member_of_pointer<_Tp>::value; + /**@}*/ + } // namespace jau /** \example test_type_traits_queries01.cpp diff --git a/include/jau/uuid.hpp b/include/jau/uuid.hpp index 25be8ef..7f40163 100644 --- a/include/jau/uuid.hpp +++ b/include/jau/uuid.hpp @@ -36,6 +36,11 @@ namespace jau { +/** \addtogroup NetUtils + * + * @{ + */ + class uuid128_t; // forward /** @@ -304,6 +309,8 @@ inline uuid128_t get_uuid128(uint8_t const * buffer, jau::nsize_t const byte_off return uuid128_t(jau::get_uint128(buffer, byte_offset, littleEndian)); } +/**@}*/ + } /* namespace jau */ #endif /* JAU_UUID_HPP_ */ |