ConceptModelRegistry.ixx File
Generic type-indexed registry for type-erased wrappers. More...
Included Headers
#include <cassert>
#include <memory>
#include <span>
#include <vector>
#include <cstddef>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | core |
| namespace | container |
Classes Index
| class | ConceptModelRegistry<AnyT, IdProvider> |
|
Generic type-indexed registry for type-erased wrapper instances. More... | |
Description
Generic type-indexed registry for type-erased wrappers.
File Listing
The file content with the documentation metadata removed is:
17export namespace helios::engine::core::container {
51 class ConceptModelRegistry {
90 for (const auto insertionIndex : insertionOrder_) {
91 itemView_.push_back(const_cast<AnyT*>(&items_[insertionIndex]));
138 template<typename T, typename... Args>
147 if (items_.size() <= idx) {
148 items_.resize(idx + 1);
150 if (underlyingAnyT_.size() <= idx) {
151 underlyingAnyT_.resize(idx + 1);
155 void* rawUnderlying = items_[idx].underlying();
156 underlyingAnyT_[idx] = rawUnderlying;
159 insertionOrder_.push_back(idx);
162 return *static_cast<T*>(rawUnderlying);
188 if (items_.size() <= idx) {
189 items_.resize(idx + 1);
191 if (underlyingAnyT_.size() <= idx) {
192 underlyingAnyT_.resize(idx + 1);
197 void* rawUnderlying = items_[idx].underlying();
198 underlyingAnyT_[idx] = rawUnderlying;
200 insertionOrder_.push_back(idx);
203 return *static_cast<T*>(rawUnderlying);
216 return item<T>() != nullptr;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.