ResourceRegistry.ixx File
Type-indexed registry for engine resources with O(1) lookup. More...
Included Headers
#include <cassert>
#include <memory>
#include <span>
#include <vector>
#include <helios.engine.runtime.world.types>
#include <helios.engine.runtime.world.concepts>
#include <helios.engine.runtime.messaging.command.CommandHandlerRegistry>
#include <helios.engine.runtime.messaging.command.CommandBufferRegistry>
#include <helios.engine.runtime.world.ManagerRegistry>
#include <helios.engine.runtime.messaging.command.CommandBuffer>
#include <helios.engine.runtime.messaging.command.concepts>
#include <helios.engine.core.memory.ErasedUnique>
#include <helios.engine.runtime.world.Manager>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | runtime |
| namespace | world |
Classes Index
| class | ResourceRegistry |
|
Unified type-indexed registry for all engine resources. More... | |
Description
Type-indexed registry for engine resources with O(1) lookup.
File Listing
The file content with the documentation metadata removed is:
28using namespace helios::engine::runtime::messaging::command;
30using namespace helios::engine::runtime::world::types;
31using namespace helios::engine::core::memory;
34export namespace helios::engine::runtime::world {
49 class ResourceRegistry {
54 ManagerRegistry managerRegistry_;
59 CommandBufferRegistry commandBufferRegistry_;
77 template<class T, class... Args>
78 requires IsManagerLike<T> || IsCommandBufferLike<T>
81 if constexpr (IsManagerLike<T>) {
85 if constexpr (IsCommandBufferLike<T>) {
89 assert(false);
101 if constexpr (IsManagerLike<T>) {
102 return managerRegistry_.has<T>();
105 if constexpr (IsCommandBufferLike<T>) {
106 return commandBufferRegistry_.has<T>();
121 if constexpr (IsManagerLike<T>) {
122 return managerRegistry_.item<T>();
125 if constexpr (IsCommandBufferLike<T>) {
126 return commandBufferRegistry_.item<T>();
147 if constexpr (IsManagerLike<T>) {
148 return *managerRegistry_.item<T>();
151 if constexpr (IsCommandBufferLike<T>) {
152 return *commandBufferRegistry_.item<T>();
155 assert(false);
164 return managerRegistry_.items();
171 return managerRegistry_.items();
179 std::span<CommandBuffer* const> commandBuffers() const noexcept {
180 return commandBufferRegistry_.items();
186 std::span<CommandBuffer*> commandBuffers() noexcept {
187 return commandBufferRegistry_.items();
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.