types#
-
namespace heph
-
namespace types#
Enums
-
struct DummyPrimitivesType#
- #include “hephaestus/types/dummy_type.h”
Collection of primitive types for testing purposes. NOTE: the data needs to be Protobuf serializable NOTE: missing primitive types shall be added at any time to increase the test coverage.
Public Members
-
bool dummy_bool = {}#
-
int8_t dummy_int8_t = {}#
-
int16_t dummy_int16_t = {}#
-
int32_t dummy_int32_t = {}#
-
int64_t dummy_int64_t = {}#
-
uint8_t dummy_uint8_t = {}#
-
uint16_t dummy_uint16_t = {}#
-
uint32_t dummy_uint32_t = {}#
-
uint64_t dummy_uint64_t = {}#
-
float dummy_float = {}#
-
double dummy_double = {}#
Public Functions
- bool=default operator== (const DummyPrimitivesType &) const
Public Static Functions
-
static DummyPrimitivesType random(std::mt19937_64 &mt)#
-
bool dummy_bool = {}#
-
struct DummyType#
- #include “hephaestus/types/dummy_type.h”
Collection of non-primitive types for testing purposes. NOTE: the data needs to be Protobuf serializable NOTE: missing generic non-primitive types can be added to increase the test coverage.
Public Members
-
DummyPrimitivesType dummy_primitives_type = {}#
-
InternalDummyEnum internal_dummy_enum = {}#
-
ExternalDummyEnum external_dummy_enum = {}#
-
std::vector<DummyPrimitivesType> dummy_vector_encapsulated#
-
std::array<int32_t, DUMMY_ARRAY_SIZE> dummy_array#
-
std::array<DummyPrimitivesType, DUMMY_ARRAY_SIZE> dummy_array_encapsulated#
-
std::unordered_map<std::size_t, DummyPrimitivesType> dummy_umap_encapsulated#
Public Functions
- bool=default operator== (const DummyType &) const
-
DummyPrimitivesType dummy_primitives_type = {}#
-
struct DummyPrimitivesType#
-
namespace types#
-
namespace heph
-
namespace types
Enums
Functions
-
template<NumericType T>
struct Bounds# - #include “hephaestus/types/bounds.h”
A class representing range bounds.
-
template<NumericType T>
-
namespace types
-
namespace fmt
-
namespace heph
-
namespace types
-
-
struct UuidV4#
- #include “hephaestus/types/uuid_v4.h”
A class representing a UUID (Universally Unique Identifier) version 4, which is purely (pseudo) randomly generated. We follow RFC 9562, which defines the UUIDv4 format. For details, see https://www.rfc-editor.org/rfc/rfc9562.html. To use a UuidV4 as a key in a hash map, we provide a custom hash function using the Abseil library’s
AbslHashValue
. Include <absl/hash/hash.h> in the implementation file and provide a custom hash function to the container, e.g. std::unordered_map<heph::types::UuidV4, DataT, absl::Hash<heph::types::UuidV4>>.Public Members
-
uint64_t high = {0ULL}#
High 64 bits of the 128 bit UUID.
-
uint64_t low = {0ULL}#
Low 64 bits of the 128 bit UUID.
Public Functions
- bool=default operator== (const UuidV4 &) const
Default comparison operator. We avoid using the spaceship operator (<=>) as random UUIDs (version 4) are not ordered.
-
bool isValid() const#
Checks if the UUID is valid. A valid UUIDv4 must neither be Nil nor Max, and it must conform to the UUIDv4 format as defined in RFC 9562.
Public Static Functions
-
static UuidV4 random(std::mt19937_64 &mt)#
Generates a random valid UUIDv4 using the provided random number generator.
-
static UuidV4 createNil()#
Creates a UUIDv4 with all bits set to zero, 00000000-0000-0000-0000-000000000000. A Nil UUID value can be useful to communicate the absence of any other UUID value in situations that otherwise require or use a 128-bit UUID. A Nil UUID can express the concept “no such value here”. Thus, it is reserved for such use as needed for implementation-specific situations.
-
static UuidV4 createMax()#
Creates a UUIDv4 with all bits set to one, FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF. A Max UUID value can be used as a sentinel value in situations where a 128-bit UUID is required, but a concept such as “end of UUID list” needs to be expressed and is reserved for such use as needed for implementation-specific situations.
-
uint64_t high = {0ULL}#
-
struct UuidV4#
-
namespace types