36 for (
const auto& s : e)
44 if (!
c->hasProviderSegment(s.id().providerSegmentName))
46 c->addProviderSegment(s.id().providerSegmentName);
48 auto* p =
c->findProviderSegment(s.id().providerSegmentName);
58 for (
const auto& s : e)
66 if (!
c->hasProviderSegment(s.id().providerSegmentName))
68 c->addProviderSegment(s.id().providerSegmentName);
70 auto* p =
c->findProviderSegment(s.id().providerSegmentName);
72 if (!p->hasEntity(s.id().entityName))
74 p->addEntity(s.id().entityName);
76 auto* en = p->findEntity(s.id().entityName);
85 for (
const auto& s : e)
93 if (!
c->hasProviderSegment(s.id().providerSegmentName))
95 c->addProviderSegment(s.id().providerSegmentName);
97 auto* p =
c->findProviderSegment(s.id().providerSegmentName);
99 if (!p->hasEntity(s.id().entityName))
101 p->addEntity(s.id().entityName);
103 auto* en = p->findEntity(s.id().entityName);
105 if (!en->hasSnapshot(s.id().timestamp))
107 en->addSnapshot(s.id().timestamp);
109 auto* sn = p->findSnapshot(s.id());
118 const std::vector<EntitySnapshot>& e)
123 for (
const auto& s : e)
126 auto coreSegmentName = s.id().coreSegmentName;
133 if (coreStructure ==
nullptr)
136 <<
": core segment '" << coreSegmentName
137 <<
"' is not part of the structure memory. Skipping.";
149 auto providerSegmentName = s.id().providerSegmentName;
150 auto* providerStructure = coreStructure->findProviderSegment(providerSegmentName);
153 if (providerStructure ==
nullptr)
156 <<
": provider segment '" << providerSegmentName
157 <<
"' is not part of the structure memory under core segment '"
158 << coreSegmentName <<
"'. Skipping.";
162 if (!
c->hasProviderSegment(providerSegmentName))
164 c->addProviderSegment(providerSegmentName, providerStructure->aronType());
166 auto* p =
c->findProviderSegment(providerSegmentName);
168 if (!p->hasEntity(s.id().entityName))
170 p->addEntity(s.id().entityName);
172 auto* en = p->findEntity(s.id().entityName);
CoreSegmentT & addCoreSegment(const std::string &name, aron::type::ObjectPtr coreSegmentType=nullptr, const std::vector< PredictionEngine > &predictionEngines={})
Add an empty core segment with the given name, type and prediction engines.