mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-10-06 18:47:18 +00:00
Align runtime skeleton with storage event UML
This commit is contained in:
@@ -86,7 +86,8 @@ class IMapTileWorkerBackend
|
||||
class MapTileAsyncRuntime
|
||||
{
|
||||
public:
|
||||
explicit MapTileAsyncRuntime(IMapTileCommandSink& commands);
|
||||
explicit MapTileAsyncRuntime(IMapTileCommandSink& commands,
|
||||
sys::runtime::RuntimePolicyStrategy* policy = nullptr);
|
||||
|
||||
uint32_t activeGeneration() const;
|
||||
std::size_t requestVisibleTiles(const MapViewportPlan& plan, uint32_t now_ms);
|
||||
@@ -94,8 +95,12 @@ class MapTileAsyncRuntime
|
||||
|
||||
private:
|
||||
static sys::runtime::RuntimePriority priorityFor(MapTileInteractionMode mode);
|
||||
sys::runtime::RuntimeCommand commandFromIntent(const sys::runtime::RuntimeIntent& intent);
|
||||
|
||||
IMapTileCommandSink& commands_;
|
||||
sys::runtime::DefaultRuntimePolicyStrategy default_policy_{};
|
||||
sys::runtime::RuntimePolicyStrategy* policy_ = nullptr;
|
||||
sys::runtime::RuntimeState state_{};
|
||||
uint32_t active_generation_ = 0;
|
||||
uint32_t next_command_id_ = 1;
|
||||
};
|
||||
@@ -107,16 +112,17 @@ class MapTileWorker
|
||||
sys::runtime::IBusArbiter& bus,
|
||||
IMapTileEventSink& events,
|
||||
uint8_t* scratch,
|
||||
std::size_t scratch_size);
|
||||
std::size_t scratch_size,
|
||||
sys::runtime::RuntimePolicyStrategy* policy = nullptr);
|
||||
|
||||
bool execute(const LoadTileCommand& command, uint32_t now_ms);
|
||||
|
||||
private:
|
||||
static sys::runtime::BusAccessPolicy busPolicyFor(sys::runtime::RuntimePriority priority);
|
||||
|
||||
IMapTileWorkerBackend& backend_;
|
||||
sys::runtime::IBusArbiter& bus_;
|
||||
IMapTileEventSink& events_;
|
||||
sys::runtime::DefaultRuntimePolicyStrategy default_policy_{};
|
||||
sys::runtime::RuntimePolicyStrategy* policy_ = nullptr;
|
||||
uint8_t* scratch_ = nullptr;
|
||||
std::size_t scratch_size_ = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user