THash - Simple hash function
Introduction
This class implement a generic hash function, used for mapping string onto a dedicated type.
Usecases
- User wants to compare two string much faster, just calculate their hashes and do a comparison for them.
Examples
#include <iostream>
using UiHash = CPPCore::THash<unsigned int>;
void main() {
UiHash myHash2(10U);
std::cout << "Value " << myHash2.hashValue() << std::endl;
UiHash myHash3("test", 7);
std::cout << "Hash for string test is "<< myHash3.hashValue() << endl;
}
TBitField
Introduction
A little class to help working with bitsets.
Usecases
You need to manage singe bits and you want to avoid dealing with the OR-, AND- and XOR-operations provided by c.
Examples
#include <iostream>
void main() {
TBitField<uint32_t> bitfield(0);
bitfield.setBit(1);
if (bitfield.getBit(1)) std::cout "First bit is set" << std:endl;
bitfield.clearBit(1);
if (!bitfield.getBit(1)) std::cout "First bit is not set" << std:endl;
}
TOptional
Introduction
Usecases
Examples
TSpan
Introduction
Usecases
Examples
TStringBase
Introduction
Usecases
Examples
TStringView
Introduction
You have to deal with string readouts without having write access to them.
Usecases
Examples
Variant
Introduction
A class to store pod-types in a much easier way if you need more dynamic in the data handling.
Usecases
You need to get data coming from a configuration, which types a dynamic.
Examples