rename doc macros

This commit is contained in:
2021-08-04 16:31:32 +03:00
parent 0c7ce272e6
commit 25def958a1
140 changed files with 963 additions and 983 deletions

View File

@@ -1,5 +1,5 @@
/*! \file pibase.h
* \brief Base types and functions
/*! @file pibase.h
* @brief Base types and functions
*
* This file implements first layer above the system and
* declares some basic useful functions
@@ -106,6 +106,9 @@
//! Macro to access private section by pointer
# define PRIVATE
//! Macro to access private section by pointer without brakes ()
# define PRIVATEWB
//! Macro to start static initializer
# define STATIC_INITIALIZER_BEGIN
@@ -113,7 +116,7 @@
# define STATIC_INITIALIZER_END
#endif
#endif //DOXYGEN
#include <functional>
@@ -220,6 +223,7 @@
// Private data macros
#ifndef DOXYGEN
#define PRIVATE_DECLARATION(e) \
struct __Private__; \
@@ -246,6 +250,7 @@
#define PRIVATE (__privateinitializer__.p)
#define PRIVATEWB __privateinitializer__.p
#endif //DOXYGEN
#define NO_COPY_CLASS(name) \
name(const name&) = delete; \
@@ -301,11 +306,11 @@ typedef unsigned long long ullong;
typedef long long llong;
typedef long double ldouble;
/*! \brief Templated function for swap two values
/*! @brief Templated function for swap two values
* \details Example:\n \snippet piincludes.cpp swap */
template<typename T> inline void piSwap(T & f, T & s) {T t(std::move(f)); f = std::move(s); s = std::move(t);}
/*! \brief Templated function for swap two values without "="
/*! @brief Templated function for swap two values without "="
* \details Example:\n \snippet piincludes.cpp swapBinary */
template<typename T> inline void piSwapBinary(T & f, T & s) {
if ((size_t*)&f == (size_t*)&s) return;
@@ -341,7 +346,7 @@ template<> inline void piSwapBinary(const void *& f, const void *& s) {
}
/*! \brief Function for compare two values without "=" by raw content
/*! @brief Function for compare two values without "=" by raw content
* \details Example:\n \snippet piincludes.cpp compareBinary */
inline bool piCompareBinary(const void * f, const void * s, size_t size) {
for (size_t i = 0; i < size; ++i)
@@ -350,7 +355,7 @@ inline bool piCompareBinary(const void * f, const void * s, size_t size) {
return true;
}
/*! \brief Templated function return round of float falue
/*! @brief Templated function return round of float falue
* \details Round is the nearest integer value \n
* There are some macros:
* - \c piRoundf for "float"
@@ -360,7 +365,7 @@ inline bool piCompareBinary(const void * f, const void * s, size_t size) {
* \snippet piincludes.cpp round */
template<typename T> inline constexpr int piRound(const T & v) {return int(v >= T(0.) ? v + T(0.5) : v - T(0.5));}
/*! \brief Templated function return floor of float falue
/*! @brief Templated function return floor of float falue
* \details Floor is the largest integer that is not greater than value \n
* There are some macros:
* - \c piFloorf for "float"
@@ -370,7 +375,7 @@ template<typename T> inline constexpr int piRound(const T & v) {return int(v >=
* \snippet piincludes.cpp floor */
template<typename T> inline constexpr int piFloor(const T & v) {return v < T(0) ? int(v) - 1 : int(v);}
/*! \brief Templated function return ceil of float falue
/*! @brief Templated function return ceil of float falue
* \details Ceil is the smallest integer that is not less than value \n
* There are some macros:
* - \c piCeilf for "float"
@@ -380,7 +385,7 @@ template<typename T> inline constexpr int piFloor(const T & v) {return v < T(0)
* \snippet piincludes.cpp ceil */
template<typename T> inline constexpr int piCeil(const T & v) {return v < T(0) ? int(v) : int(v) + 1;}
/*! \brief Templated function return absolute of numeric falue
/*! @brief Templated function return absolute of numeric falue
* \details Absolute is the positive or equal 0 value \n
* There are some macros:
* - \c piAbss for "short"
@@ -394,7 +399,7 @@ template<typename T> inline constexpr int piCeil(const T & v) {return v < T(0) ?
* \snippet piincludes.cpp abs */
template<typename T> inline constexpr T piAbs(const T & v) {return (v >= T(0) ? v : -v);}
/*! \brief Templated function return minimum of two values
/*! @brief Templated function return minimum of two values
* \details There are some macros:
* - \c piMins for "short"
* - \c piMini for "int"
@@ -407,7 +412,7 @@ template<typename T> inline constexpr T piAbs(const T & v) {return (v >= T(0) ?
* \snippet piincludes.cpp min2 */
template<typename T> inline constexpr T piMin(const T & f, const T & s) {return ((f > s) ? s : f);}
/*! \brief Templated function return minimum of tree values
/*! @brief Templated function return minimum of tree values
* \details There are some macros:
* - \c piMins for "short"
* - \c piMini for "int"
@@ -420,7 +425,7 @@ template<typename T> inline constexpr T piMin(const T & f, const T & s) {return
* \snippet piincludes.cpp min3 */
template<typename T> inline constexpr T piMin(const T & f, const T & s, const T & t) {return ((f < s && f < t) ? f : ((s < t) ? s : t));}
/*! \brief Templated function return maximum of two values
/*! @brief Templated function return maximum of two values
* \details There are some macros:
* - \c piMaxs for "short"
* - \c piMaxi for "int"
@@ -433,7 +438,7 @@ template<typename T> inline constexpr T piMin(const T & f, const T & s, const T
* \snippet piincludes.cpp max2 */
template<typename T> inline constexpr T piMax(const T & f, const T & s) {return ((f < s) ? s : f);}
/*! \brief Templated function return maximum of tree values
/*! @brief Templated function return maximum of tree values
* \details There are some macros:
* - \c piMaxs for "short"
* - \c piMaxi for "int"
@@ -446,7 +451,7 @@ template<typename T> inline constexpr T piMax(const T & f, const T & s) {return
* \snippet piincludes.cpp max3 */
template<typename T> inline constexpr T piMax(const T & f, const T & s, const T & t) {return ((f > s && f > t) ? f : ((s > t) ? s : t));}
/*! \brief Templated function return clamped value
/*! @brief Templated function return clamped value
* \details Clamped is the not greater than "max" and not lesser than "min" value \n
* There are some macros:
* - \c piClamps for "short"
@@ -466,10 +471,10 @@ inline void piLetobe(void * data, int size) {
piSwap<uchar>(((uchar*)data)[size - i - 1], ((uchar*)data)[i]);
}
/// \brief Templated function that inverse byte order of value "v"
/// @brief Templated function that inverse byte order of value "v"
template<typename T> inline void piLetobe(T * v) {piLetobe(v, sizeof(T));}
/*! \brief Templated function that returns "v" with inversed byte order
/*! @brief Templated function that returns "v" with inversed byte order
* \details This function used to convert values between little and big endian \n
* There are some macros:
* - \c piLetobes for "ushort"
@@ -495,7 +500,7 @@ template<> inline float piLetobe(const float & v) {
return a.f;
}
/// \brief Generic hash function, implements murmur3/32 algorithm
/// @brief Generic hash function, implements murmur3/32 algorithm
inline uint piHashData(const uchar * data, uint len, uint seed = 0) {
if (!data || len <= 0) return 0u;
uint h = seed;