Description
Namespaces
Classes
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. |
Typedefs
Variables
Functions
|
|
|
|
std::string |
encodeBase64(const std::vector< uint8_t > & source) |
|
|
std::vector< uint8_t > |
decodeBase64(const std::string & source) |
template< typename Function > |
|
function_traits < Function >::pointer |
to_function_pointer(Function & lambda) |
template< typename Function > |
|
function_traits < Function >::function |
to_function(Function & lambda) |
|
|
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) |
template< typename extension_t , typename object_t , typename… args > |
|
extension_t * |
addObjectExtension(object_t * obj, args &&… params) |
template< typename extension_t , typename object_t , typename… args > |
|
extension_t * |
addObjectExtension(const StringIdentifier & extName, object_t * obj, args &&… params) |
template< typename extension_t > |
|
extension_t * |
getObjectExtension(const Util::AttributeProvider * obj) |
template< typename extension_t > |
|
extension_t * |
getObjectExtension(const StringIdentifier & extName, const Util::AttributeProvider * obj) |
template< typename extension_t > |
|
extension_t * |
requireObjectExtension(const Util::AttributeProvider * obj) |
template< typename extension_t > |
|
extension_t * |
requireObjectExtension(const StringIdentifier & extName, const Util::AttributeProvider * obj) |
template< typename extension_t > |
|
bool |
hasObjectExtension(const Util::AttributeProvider * obj) |
template< typename extension_t > |
|
bool |
hasObjectExtension(const StringIdentifier & extName, const Util::AttributeProvider * obj) Returns true iff theobject has a extension of type extension_t namedextName . |
|
|
size_t |
getNumBytes( TypeConstant t) |
|
|
std::string |
getTypeString( TypeConstant t) |
|
|
bool |
init() |
|
|
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< > |
|
double |
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) |
template< > |
|
double |
unnormalizeSigned(double value) |
Documentation
variable
Util::val_32_const
Defined in Util/Hashing.h:57
variable
Util::prime_32_const
Defined in Util/Hashing.h:58
variable
Util::val_64_const
Defined in Util/Hashing.h:59
variable
Util::prime_64_const
Defined in Util/Hashing.h:60
function
Util::calcHash
|
|
|
|
|
|
uint32_t calcHash( |
const uint8_t * |
ptr, |
|
size_t |
size |
) |
|
|
Defined in Util/Hashing.h:28
function
Util::md5
|
|
|
|
|
|
std::string md5( |
const std::string & |
str ) |
Defined in Util/Hashing.h:30
function
Util::hash_combine
|
|
|
template< class T > |
|
|
void hash_combine( |
std::size_t & |
seed, |
|
const T & |
v |
) |
|
|
Defined in Util/Hashing.h:33
function
Util::hash_param
Defined in Util/Hashing.h:38
function
Util::hash_param
|
|
|
template< typename T > |
|
|
void hash_param( |
size_t & |
seed, |
|
const T & |
value |
) |
|
|
Defined in Util/Hashing.h:41
function
Util::hash_param
|
|
|
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
Util::hash
|
|
|
template< typename T > |
|
|
size_t hash( |
const T & |
arg ) |
Defined in Util/Hashing.h:52
function
Util::hash32
|
|
|
|
|
|
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
Util::hash64
|
|
|
|
|
|
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
Util::output_priority_t
Enumerator |
|
Description |
Enumerator |
|
Description |
OUTPUT_DEBUG |
|
|
OUTPUT_WARNING |
|
|
OUTPUT_ERROR |
|
|
Defined in Util/Macros.h:22
enum
Util::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
typedef
Util::StringAttribute
Defined in Util/GenericAttribute.h:32
typedef
Util::ResourceRef
Defined in Util/Resources/ResourceAccessor.h:24
variable
Util::info
Defined in Util/Utils.h:156
function
Util::encodeBase64
|
|
|
|
|
|
std::string encodeBase64( |
const std::vector< uint8_t > & |
source ) |
Defined in Util/Encoding.h:23
function
Util::decodeBase64
|
|
|
|
|
|
std::vector< uint8_t > decodeBase64( |
const std::string & |
source ) |
Defined in Util/Encoding.h:24
function
Util::to_function_pointer
Defined in Util/Factory/LambdaFactory.h:40
function
Util::to_function
Defined in Util/Factory/LambdaFactory.h:46
function
Util::loadLibrary
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
Util::loadFunction
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
Util::unloadLibrary
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
Util::output
Defined in Util/Macros.h:27
function
Util::composeDebugMessage
Defined in Util/Macros.h:28
function
Util::addObjectExtension
|
|
|
template< typename extension_t , typename object_t , typename… args > |
|
|
extension_t * addObjectExtension( |
object_t * |
obj, |
|
args &&… |
params |
) |
|
|
Create and add an extension of type extension_t to the givenobject
.
-
Additional parameters are passed to the extension’s constructor.
-
The extension’s name is inquired by calling extension_t::getObjectExtensionName() or extension_t::getClassId()
-
The created extension is returned.
Defined in Util/ObjectExtension.h:167
function
Util::addObjectExtension
|
|
|
template< typename extension_t , typename object_t , typename… args > |
|
|
extension_t * addObjectExtension( |
const StringIdentifier & |
extName, |
|
object_t * |
obj, |
|
args &&… |
params |
) |
|
|
Create and add an extension of type extension_t to the givenobject
namedextName
.
See also: addObjectExtension (obj, params…)
Defined in Util/ObjectExtension.h:175
function
Util::getObjectExtension
If the givenobject
has a extension of type extension_t, it is returned; nullptr otherwise.
- The extension’s name is inquired by calling extension_t::getObjectExtensionName() or extension_t::getClassId()
Defined in Util/ObjectExtension.h:182
function
Util::getObjectExtension
If the givenobject
has a extension of type extension_t namedextName
, it is returned; nullptr otherwise.
See also: getObjectExtension(obj)
Defined in Util/ObjectExtension.h:189
function
Util::requireObjectExtension
If the givenobject
has a extension of type extension_t, it is returned; otherwise, an exception is thrown.
- The extension’s name is inquired by calling extension_t::getObjectExtensionName() or extension_t::getClassId().
Defined in Util/ObjectExtension.h:196
function
Util::requireObjectExtension
If the givenobject
has a extension of type extension_t namedextName
, it is returned; otherwise, an exception is thrown.
- The extension’s name is inquired by calling extension_t::getObjectExtensionName() or extension_t::getClassId().
Defined in Util/ObjectExtension.h:203
function
Util::hasObjectExtension
Returns true iff theobject
has a extension of type extension_t.
- The extension’s name is inquired by calling extension_t::getObjectExtensionName() or extension_t::getClassId().
Defined in Util/ObjectExtension.h:212
function
Util::hasObjectExtension
Returns true iff theobject
has a extension of type extension_t namedextName
.
Defined in Util/ObjectExtension.h:217
function
Util::getNumBytes
Defined in Util/TypeConstant.h:37
function
Util::getTypeString
Defined in Util/TypeConstant.h:39
function
Util::init
Initialize the Util library. This function has to be called at least once before using the library.
Parameters
:
Defined in Util/Util.h:25
function
Util::enableInfo
Defined in Util/Utils.h:158
function
Util::disableInfo
Defined in Util/Utils.h:159
function
Util::align
|
|
|
template< typename T > |
|
|
T align( |
T |
offset, |
|
T |
alignment |
) |
|
|
Defined in Util/Utils.h:164
function
Util::clamp
|
|
|
template< typename T > |
|
|
T clamp( |
T |
value, |
|
T |
min, |
|
T |
max |
) |
|
|
Defined in Util/Utils.h:171
function
Util::normalizeUnsigned
Defined in Util/Utils.h:176
function
Util::normalizeUnsigned
Defined in Util/Utils.h:178
function
Util::normalizeUnsigned
Defined in Util/Utils.h:180
function
Util::unnormalizeUnsigned
Defined in Util/Utils.h:185
function
Util::unnormalizeUnsigned
Defined in Util/Utils.h:187
function
Util::unnormalizeUnsigned
Defined in Util/Utils.h:189
function
Util::normalizeSigned
Defined in Util/Utils.h:194
function
Util::normalizeSigned
Defined in Util/Utils.h:196
function
Util::normalizeSigned
Defined in Util/Utils.h:198
function
Util::unnormalizeSigned
Defined in Util/Utils.h:203
function
Util::unnormalizeSigned
Defined in Util/Utils.h:205
function
Util::unnormalizeSigned
Defined in Util/Utils.h:207