QuasarAppLib
qaglobalutils.h File Reference
#include <type_traits>
#include <typeinfo>
#include <QByteArray>
#include "QtGlobal"
#include "quasarapp_global.h"
Include dependency graph for qaglobalutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define H_8   static_type_hash_8
 H_8 This is short wraper of the static_type_hash_8 fucntion.
 
#define H_16   static_type_hash_16
 H_16 This is short wraper of the static_type_hash_16 fucntion.
 
#define H_32   static_type_hash_32
 H_32 This is short wraper of the static_type_hash_32 fucntion.
 
#define debug_assert(C, M)   Q_ASSERT(C && M)
 

Functions

template<typename T >
constexpr T operator| (T lhs, T rhs)
 
template<typename T >
constexpr T operator& (T lhs, T rhs)
 
template<typename T >
constexpr T operator>> (T lhs, T rhs)
 
template<typename T >
constexpr T operator<< (T lhs, T rhs)
 
template<typename T >
constexpr T operator~ (T lhs)
 
template<typename T >
constexpr T operator^ (T lhs, T rhs)
 
template<class T >
uint32_t static_type_hash_32 () noexcept
 static_type_hash_32 This function return hash code of the class T. For get more information see the std documentation.
 
template<class T >
uint16_t static_type_hash_16 () noexcept
 static_type_hash_16 This function return hash code of the class T. For get more information see the std documentation.
 
template<class T >
uint8_t static_type_hash_8 () noexcept
 static_type_hash_8 This function return hash code of the class T. For get more information see the std documentation.
 
template<class T >
uint32_t static_type_hash_32 (T &object) noexcept
 static_type_hash_32 This function return hash code of a T type using object.
 
template<class T >
uint16_t static_type_hash_16 (T &object) noexcept
 static_type_hash_16 This function return hash code of a T type using object.
 
template<class T >
uint8_t static_type_hash_8 (T &object) noexcept
 static_type_hash_8 This function return hash code of a T type using object.
 
void QUASARAPPSHARED_EXPORT randomArray (int size, QByteArray &result)
 randomArray This function return random arrat with size size
 

Macro Definition Documentation

◆ debug_assert

#define debug_assert (   C,
  M 
)    Q_ASSERT(C && M)

Definition at line 150 of file qaglobalutils.h.

◆ H_16

H_16 This is short wraper of the static_type_hash_16 fucntion.

Definition at line 144 of file qaglobalutils.h.

◆ H_32

H_32 This is short wraper of the static_type_hash_32 fucntion.

Definition at line 147 of file qaglobalutils.h.

◆ H_8

H_8 This is short wraper of the static_type_hash_8 fucntion.

Definition at line 141 of file qaglobalutils.h.

Function Documentation

◆ operator&()

template<typename T >
constexpr T operator& ( T  lhs,
T  rhs 
)
inlineconstexpr

Definition at line 28 of file qaglobalutils.h.

Here is the call graph for this function:

◆ operator<<()

template<typename T >
constexpr T operator<< ( T  lhs,
T  rhs 
)
inlineconstexpr

Definition at line 48 of file qaglobalutils.h.

Here is the call graph for this function:

◆ operator>>()

template<typename T >
constexpr T operator>> ( T  lhs,
T  rhs 
)
inlineconstexpr

Definition at line 38 of file qaglobalutils.h.

Here is the call graph for this function:

◆ operator^()

template<typename T >
constexpr T operator^ ( T  lhs,
T  rhs 
)
inlineconstexpr

Definition at line 68 of file qaglobalutils.h.

Here is the call graph for this function:

◆ operator|()

template<typename T >
constexpr T operator| ( T  lhs,
T  rhs 
)
inlineconstexpr

Definition at line 18 of file qaglobalutils.h.

Here is the call graph for this function:

◆ operator~()

template<typename T >
constexpr T operator~ ( T  lhs)
inlineconstexpr

Definition at line 58 of file qaglobalutils.h.

Here is the call graph for this function:

◆ randomArray()

void QUASARAPPSHARED_EXPORT randomArray ( int  size,
QByteArray result 
)

randomArray This function return random arrat with size size

Parameters
sizeThis is size of needed array.
resultThis is result value of generated array.

Definition at line 19 of file qaglobalutils.cpp.

Here is the call graph for this function:

◆ static_type_hash_16() [1/2]

template<class T >
uint16_t static_type_hash_16 ( )
noexcept

static_type_hash_16 This function return hash code of the class T. For get more information see the std documentation.

Note
This method will create a T object on stack, so if you have a alredy created object use the static_type_hash_16(const T&) function.
Returns
uint16_t hash code of the class T

Definition at line 95 of file qaglobalutils.h.

Here is the call graph for this function:

◆ static_type_hash_16() [2/2]

template<class T >
uint16_t static_type_hash_16 ( T object)
noexcept

static_type_hash_16 This function return hash code of a T type using object.

Parameters
objectThis is object of the T type using for generate hash.
Returns
uint16_t hash code of the class T

Definition at line 126 of file qaglobalutils.h.

Here is the call graph for this function:

◆ static_type_hash_32() [1/2]

template<class T >
uint32_t static_type_hash_32 ( )
noexcept

static_type_hash_32 This function return hash code of the class T. For get more information see the std documentation.

Note
This method will create a T object on stack, so if you have a alredy created object use the static_type_hash_32(const T&) function.
Returns
uint32_t hash code of the class T

Definition at line 84 of file qaglobalutils.h.

Here is the call graph for this function:

◆ static_type_hash_32() [2/2]

template<class T >
uint32_t static_type_hash_32 ( T object)
noexcept

static_type_hash_32 This function return hash code of a T type using object.

Parameters
objectThis is object of the T type using for generate hash.
Returns
uint32_t hash code of the class T

Definition at line 116 of file qaglobalutils.h.

Here is the call graph for this function:

◆ static_type_hash_8() [1/2]

template<class T >
uint8_t static_type_hash_8 ( )
noexcept

static_type_hash_8 This function return hash code of the class T. For get more information see the std documentation.

Note
This method will create a T object on stack, so if you have a alredy created object use the static_type_hash_8(const T&) function.
Returns
uint8_t hash code of the class T

Definition at line 106 of file qaglobalutils.h.

Here is the call graph for this function:

◆ static_type_hash_8() [2/2]

template<class T >
uint8_t static_type_hash_8 ( T object)
noexcept

static_type_hash_8 This function return hash code of a T type using object.

Parameters
objectThis is object of the T type using for generate hash.
Returns
uint8_t hash code of the class T

Definition at line 136 of file qaglobalutils.h.

Here is the call graph for this function: