collection_resolver progress

This commit is contained in:
Sascha Kühl
2026-01-29 17:23:16 +01:00
parent 602b77e67b
commit bcec740d60
17 changed files with 100 additions and 59 deletions
+6 -2
View File
@@ -1,12 +1,13 @@
#ifndef MATADOR_COLLECTION_PROXY_HPP
#define MATADOR_COLLECTION_PROXY_HPP
#include <atomic>
#include "matador/object/collection_resolver.hpp"
#include "matador/utils/identifier.hpp"
#include <atomic>
#include <mutex>
#include <vector>
namespace matador::object {
@@ -33,13 +34,15 @@ public:
return owner_id_;
}
const std::vector<Type>& items() const {
resolve();
return items_;
}
std::vector<Type>& items() {
resolve();
return items_;
}
private:
void resolve() const {
void resolve() {
if (loaded_) {
return;
}
@@ -53,6 +56,7 @@ private:
}
items_ = resolver->resolve(owner_id_);
loaded_ = true;
}
private: