collection_resolver progress
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user