collection resolver progress

This commit is contained in:
2026-02-01 13:17:40 +01:00
parent c838e9dd7b
commit f9333158e2
21 changed files with 247 additions and 192 deletions
+2
View File
@@ -120,6 +120,8 @@ add_library(matador-core STATIC
utils/uuid.cpp
utils/value.cpp
utils/version.cpp
../../include/matador/object/collection_utils.hpp
object/collection_utils.cpp
)
target_link_libraries(matador-core ${CMAKE_DL_LIBS})
+22
View File
@@ -0,0 +1,22 @@
#include "matador/object/collection_utils.hpp"
namespace matador::object {
bool collection_composite_key::operator==(const collection_composite_key &other) const {
return root_type == other.root_type &&
type == other.type &&
name == other.name;
}
std::size_t collection_composite_key_hash::operator()(const collection_composite_key &k) const noexcept {
const std::size_t h1 = std::hash<std::type_index>{}(k.root_type);
const std::size_t h2 = std::hash<std::type_index>{}(k.type);
const std::size_t h3 = std::hash<std::string>{}(k.name);
// Klassische Hash-Kombination (Boost-Style)
std::size_t seed = h1;
seed ^= h2 + 0x9e3779b9 + (seed << 6) + (seed >> 2);
seed ^= h3 + 0x9e3779b9 + (seed << 6) + (seed >> 2);
return seed;
}
}