|
@@ -24,6 +24,7 @@ public:
|
|
|
using Keywords = std::unordered_map<std::string_view, std::set<schema::Wraps>>;
|
|
using Keywords = std::unordered_map<std::string_view, std::set<schema::Wraps>>;
|
|
|
|
|
|
|
|
private:
|
|
private:
|
|
|
|
|
+ ConstraintFactory<A> const & constraints_;
|
|
|
DocumentCache<A> & external_;
|
|
DocumentCache<A> & external_;
|
|
|
ReferenceCache references_;
|
|
ReferenceCache references_;
|
|
|
|
|
|
|
@@ -34,9 +35,9 @@ private:
|
|
|
|
|
|
|
|
public:
|
|
public:
|
|
|
ReferenceManager(DocumentCache<A> & external, A const & root, schema::Version version,
|
|
ReferenceManager(DocumentCache<A> & external, A const & root, schema::Version version,
|
|
|
- Keywords const & keywords)
|
|
|
|
|
- : external_(external), roots_{{{}, root}} {
|
|
|
|
|
- prime(root, {}, version, keywords);
|
|
|
|
|
|
|
+ ConstraintFactory<A> const & constraints)
|
|
|
|
|
+ : external_(external), constraints_(constraints), roots_{{{}, root}} {
|
|
|
|
|
+ prime(root, {}, version, constraints_.keywords(version));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
auto dynamic_scope(Reference const & ref) {
|
|
auto dynamic_scope(Reference const & ref) {
|
|
@@ -57,7 +58,7 @@ public:
|
|
|
|
|
|
|
|
// TODO(samjaffe): Change Versions if needed...
|
|
// TODO(samjaffe): Change Versions if needed...
|
|
|
references_.emplace(ref.uri());
|
|
references_.emplace(ref.uri());
|
|
|
- prime(*external, ref, context.version, context.factory.keywords(context.version));
|
|
|
|
|
|
|
+ prime(*external, ref, context.version, constraints_.keywords(context.version));
|
|
|
|
|
|
|
|
// May have a sub-id that we map to
|
|
// May have a sub-id that we map to
|
|
|
if (auto it = roots_.find(ref.root()); it != roots_.end()) {
|
|
if (auto it = roots_.find(ref.root()); it != roots_.end()) {
|