void

Description

Namespaces

   
namespace Util::MicroXML
namespace Util::Numeric
namespace Util::Utils

Classes

   
class Util::JSON_Parser
class Util::ProgressIndicator
class Util::Timer
High resolution timer.
class Util::TriState
Class that can hold one of three values: true, fals, undefined.
class Util::DebugOutput

Hashing

   
   
constexpr uint32_t val_32_const
   
constexpr uint32_t prime_32_const
   
constexpr uint64_t val_64_const
   
constexpr uint64_t prime_64_const
   
uint32_t calcHash(const uint8_t * ptr, size_t size)
   
std::string md5(const std::string & str)
template< class T >  
void hash_combine(std::size_t & seed, const T & v)
   
void hash_param(size_t & seed)
template< typename T >  
void hash_param(size_t & seed, const T & value)
template< typename T , typename… Args >  
void hash_param(size_t & seed, const T & first_arg, const Args &… args)
template< typename T >  
size_t hash(const T & arg)
   
constexpr uint32_t hash32(const char *const str, const uint32_t value)
   
constexpr uint64_t hash64(const char *const str, const uint64_t value)
FNV1a c++11 constexpr compile time hash functions, 64 bit.

Enumerations

   
   
enum output_priority_t {OUTPUT_DEBUG, OUTPUT_WARNING, OUTPUT_ERROR}
   
enum TypeConstant {UINT8, UINT16, UINT32, UINT64, INT8, INT16, INT32, INT64, FLOAT, DOUBLE, HALF, BOOL}
This constants should not change and may be used for serialization.

Variables

   
   
DebugOutput info

Functions

   
   
std::string encodeBase64(const std::vector< uint8_t > & source)
   
std::vector< uint8_t > decodeBase64(const std::string & source)
   
const StringIdentifier loadLibrary(const std::string & filename)
   
void * loadFunction(const StringIdentifier & libraryId, const std::string & name)
   
void unloadLibrary(const StringIdentifier & libraryId)
   
void output(output_priority_t priority, const std::string & message)
   
std::string composeDebugMessage(const std::string & message, const char * file, int line)
   
size_t getNumBytes(TypeConstant t)
   
std::string getTypeString(TypeConstant t)
   
void enableInfo()
   
void disableInfo()
template< typename T >  
T align(T offset, T alignment)
template< typename T >  
T clamp(T value, T min, T max)
template< typename T >  
double normalizeUnsigned(T value)
template< >  
double normalizeUnsigned(float value)
template< >  
double normalizeUnsigned(double value)
template< typename T >  
T unnormalizeUnsigned(double value)
template< >  
float unnormalizeUnsigned(double value)
template< typename T >  
double normalizeSigned(T value)
template< >  
double normalizeSigned(float value)
template< >  
double normalizeSigned(double value)
template< typename T >  
T unnormalizeSigned(double value)
template< >  
float unnormalizeSigned(double value)

Documentation

variable
val_32_const

public
 
 
constexpr uint32_t val_32_const

Defined in Util/Hashing.h:57


variable
prime_32_const

public
 
 
constexpr uint32_t prime_32_const

Defined in Util/Hashing.h:58


variable
val_64_const

public
 
 
constexpr uint64_t val_64_const

Defined in Util/Hashing.h:59


variable
prime_64_const

public
 
 
constexpr uint64_t prime_64_const

Defined in Util/Hashing.h:60


function
calcHash

public
     
     
uint32_t calcHash( const uint8_t * ptr,
  size_t size
)    

Defined in Util/Hashing.h:28


function
md5

public
     
     
std::string md5( const std::string & str )

Defined in Util/Hashing.h:30


function
hash_combine

public inline
     
template< class T >    
void hash_combine( std::size_t & seed,
  const T & v
)    

Defined in Util/Hashing.h:33


function
hash_param

public inline
     
     
void hash_param( size_t & seed )

Defined in Util/Hashing.h:38


function
hash_param

public inline
     
template< typename T >    
void hash_param( size_t & seed,
  const T & value
)    

Defined in Util/Hashing.h:41


function
hash_param

public inline
     
template< typename T , typename… Args >    
void hash_param( size_t & seed,
  const T & first_arg,
  const Args &… args
)    

Defined in Util/Hashing.h:46


function
hash

public inline
     
template< typename T >    
size_t hash( const T & arg )

Defined in Util/Hashing.h:52


function
hash32

public inline
     
     
constexpr uint32_t hash32( const char *const str,
  const uint32_t value
)    

FNV1a c++11 constexpr compile time hash functions, 32 bit str should be a null terminated string literal, value should be left out e.g hash32(“example”) code license: public domain or equivalent post:https://notes.underscorediscovery.com/constexpr-fnv1a/

Defined in Util/Hashing.h:68


function
hash64

public inline
     
     
constexpr uint64_t hash64( const char *const str,
  const uint64_t value
)    

FNV1a c++11 constexpr compile time hash functions, 64 bit.

See also: { hash32() }

Defined in Util/Hashing.h:73


enum
output_priority_t

public
 
 
enum output_priority_t
Enumerator   Description
Enumerator   Description
OUTPUT_DEBUG    
OUTPUT_WARNING    
OUTPUT_ERROR    

Defined in Util/Macros.h:22


enum
TypeConstant

public
 
 
enum TypeConstant
Enumerator   Description
Enumerator   Description
UINT8 = 0  
UINT16 = 1  
UINT32 = 2  
UINT64 = 3  
INT8 = 4  
INT16 = 5  
INT32 = 6  
INT64 = 7  
FLOAT = 8  
DOUBLE = 9  
HALF = 10  
BOOL = 11  

This constants should not change and may be used for serialization.

Defined in Util/TypeConstant.h:22


variable
info

public
 
 
DebugOutput info

Defined in Util/Utils.h:156


function
encodeBase64

public
     
     
std::string encodeBase64( const std::vector< uint8_t > & source )

Defined in Util/Encoding.h:23


function
decodeBase64

public
     
     
std::vector< uint8_t > decodeBase64( const std::string & source )

Defined in Util/Encoding.h:24


function
loadLibrary

public
     
     
const StringIdentifier loadLibrary( const std::string & filename )

Function used to dynamically load a library at runtime.

Note: This is highly experimental and not intended for use in production code. Use with caution.

Parameters

filename
File path to the dynamic library.

Returns

StringIdentifier of the filename on success (used as library handle), or empty StringIdentifier on failure.

Defined in Util/LoadLibrary.h:29


function
loadFunction

public
     
     
void * loadFunction( const StringIdentifier & libraryId,
  const std::string & name
)    

Loads a function of a dynamically loaded library at runtime.

Note: This is highly experimental and not intended for use in production code. Use with caution.

Parameters

libraryId
Library handle received from loadLibrary.
name
name of the function.

Returns

Function handle or nullptr.

Defined in Util/LoadLibrary.h:40


function
unloadLibrary

public
     
     
void unloadLibrary( const StringIdentifier & libraryId )

Function used to unload a dynamically loaded library.

Note: This is highly experimental and not intended for use in production code. Use with caution. Actually, don’t use it at all, because it can cause unforseeable side effects.

Parameters

libraryId
Library handle received from loadLibrary.

Defined in Util/LoadLibrary.h:50


function
output

public
     
     
void output( output_priority_t priority,
  const std::string & message
)    

Defined in Util/Macros.h:27


function
composeDebugMessage

public
     
     
std::string composeDebugMessage( const std::string & message,
  const char * file,
  int line
)    

Defined in Util/Macros.h:28


function
getNumBytes

public
     
     
size_t getNumBytes( TypeConstant t )

Defined in Util/TypeConstant.h:37


function
getTypeString

public
     
     
std::string getTypeString( TypeConstant t )

Defined in Util/TypeConstant.h:39


function
enableInfo

public
   
   
void enableInfo( )

Defined in Util/Utils.h:158


function
disableInfo

public
   
   
void disableInfo( )

Defined in Util/Utils.h:159


function
align

public inline
     
template< typename T >    
T align( T offset,
  T alignment
)    

Defined in Util/Utils.h:164


function
clamp

public inline
     
template< typename T >    
T clamp( T value,
  T min,
  T max
)    

Defined in Util/Utils.h:171


function
normalizeUnsigned

public inline
     
template< typename T >    
double normalizeUnsigned( T value )

Defined in Util/Utils.h:176


function
normalizeUnsigned

public inline
     
template< >    
double normalizeUnsigned( float value )

Defined in Util/Utils.h:178


function
normalizeUnsigned

public inline
     
template< >    
double normalizeUnsigned( double value )

Defined in Util/Utils.h:180


function
unnormalizeUnsigned

public inline
     
template< typename T >    
T unnormalizeUnsigned( double value )

Defined in Util/Utils.h:185


function
unnormalizeUnsigned

public inline
     
template< >    
float unnormalizeUnsigned( double value )

Defined in Util/Utils.h:187


function
normalizeSigned

public inline
     
template< typename T >    
double normalizeSigned( T value )

Defined in Util/Utils.h:194


function
normalizeSigned

public inline
     
template< >    
double normalizeSigned( float value )

Defined in Util/Utils.h:196


function
normalizeSigned

public inline
     
template< >    
double normalizeSigned( double value )

Defined in Util/Utils.h:198


function
unnormalizeSigned

public inline
     
template< typename T >    
T unnormalizeSigned( double value )

Defined in Util/Utils.h:203


function
unnormalizeSigned

public inline
     
template< >    
float unnormalizeSigned( double value )

Defined in Util/Utils.h:205