|
Bicameral Engine
GPU-resident engine for a magic-research open-world game
|
#include <table_hot_reload.h>
Classes | |
| struct | Scheduled |
Public Member Functions | |
| TableHotReload (script::ReactionTableSource source, std::shared_ptr< const script::LoadedReactionTable > initial, bool watch) | |
| void | Poll (uint64_t frameNumber) |
| std::expected< std::vector< sim::ProbeTableSwap >, std::string > | TakeSwaps (uint64_t firstUnit, uint32_t unitCount, uint32_t unitsPerTick, bool replaying, bool canAddCommand, uint32_t &nextSequence, std::vector< sim::ProbeCommand > &commands) |
| uint64_t | AppliedVersion () const |
| uint32_t | AppliedCount () const |
| uint32_t | FailedCount () const |
| bool | Watching () const |
| bool | Waiting () const |
| const std::string & | LastMessage () const |
| bool | LastFailed () const |
Private Member Functions | |
| void | Remember (const std::shared_ptr< const script::LoadedReactionTable > &table) |
| std::expected< void, std::string > | ScheduleReplayed (std::span< const sim::ProbeCommand > commands) |
Private Attributes | |
| std::optional< script::ReactionTableHotReload > | m_reload |
| std::map< uint64_t, std::shared_ptr< const script::LoadedReactionTable > > | m_known |
| std::shared_ptr< const script::LoadedReactionTable > | m_waiting |
| std::vector< Scheduled > | m_scheduled |
| std::vector< std::shared_ptr< const script::LoadedReactionTable > > | m_inFlight |
| uint64_t | m_appliedVersion = 0 |
| uint32_t | m_appliedCount = 0 |
| uint32_t | m_failedCount = 0 |
| std::string | m_lastMessage |
| bool | m_lastFailed = false |
Definition at line 28 of file table_hot_reload.h.
| bicameral::frame::TableHotReload::TableHotReload | ( | script::ReactionTableSource | source, |
| std::shared_ptr< const script::LoadedReactionTable > | initial, | ||
| bool | watch ) |
Definition at line 20 of file table_hot_reload.cpp.
References m_appliedVersion, m_reload, and Remember().
|
inlinenodiscard |
Definition at line 47 of file table_hot_reload.h.
References m_appliedCount.
|
inlinenodiscard |
Definition at line 46 of file table_hot_reload.h.
References m_appliedVersion.
|
inlinenodiscard |
Definition at line 48 of file table_hot_reload.h.
References m_failedCount.
|
inlinenodiscard |
Definition at line 52 of file table_hot_reload.h.
References m_lastFailed.
|
inlinenodiscard |
Definition at line 51 of file table_hot_reload.h.
References m_lastMessage.
| void bicameral::frame::TableHotReload::Poll | ( | uint64_t | frameNumber | ) |
Definition at line 32 of file table_hot_reload.cpp.
References bicameral::script::Failed, bicameral::Info, bicameral::Log(), m_failedCount, m_lastFailed, m_lastMessage, m_reload, m_waiting, bicameral::script::HotReloadResult::message, bicameral::script::Reloaded, Remember(), bicameral::Sim, bicameral::script::HotReloadResult::state, bicameral::script::HotReloadResult::table, and bicameral::Warning.
|
private |
Definition at line 28 of file table_hot_reload.cpp.
References m_known.
Referenced by Poll(), and TableHotReload().
|
nodiscardprivate |
Definition at line 57 of file table_hot_reload.cpp.
References m_appliedVersion, m_known, m_scheduled, and bicameral::sim::TableCommandVersion().
Referenced by TakeSwaps().
|
nodiscard |
Definition at line 78 of file table_hot_reload.cpp.
References bicameral::sim::CommandPrecedes(), bicameral::Info, bicameral::Log(), m_appliedCount, m_appliedVersion, m_inFlight, m_scheduled, m_waiting, bicameral::sim::MakeTableCommand(), ScheduleReplayed(), and bicameral::Sim.
|
inlinenodiscard |
Definition at line 50 of file table_hot_reload.h.
References m_waiting.
|
inlinenodiscard |
Definition at line 49 of file table_hot_reload.h.
References m_reload.
|
private |
Definition at line 71 of file table_hot_reload.h.
Referenced by AppliedCount(), and TakeSwaps().
|
private |
Definition at line 70 of file table_hot_reload.h.
Referenced by AppliedVersion(), ScheduleReplayed(), TableHotReload(), and TakeSwaps().
|
private |
Definition at line 72 of file table_hot_reload.h.
Referenced by FailedCount(), and Poll().
|
private |
Definition at line 68 of file table_hot_reload.h.
Referenced by TakeSwaps().
|
private |
Definition at line 64 of file table_hot_reload.h.
Referenced by Remember(), and ScheduleReplayed().
|
private |
Definition at line 74 of file table_hot_reload.h.
Referenced by LastFailed(), and Poll().
|
private |
Definition at line 73 of file table_hot_reload.h.
Referenced by LastMessage(), and Poll().
|
private |
Definition at line 63 of file table_hot_reload.h.
Referenced by Poll(), TableHotReload(), and Watching().
|
private |
Definition at line 66 of file table_hot_reload.h.
Referenced by ScheduleReplayed(), and TakeSwaps().
|
private |
Definition at line 65 of file table_hot_reload.h.
Referenced by Poll(), TakeSwaps(), and Waiting().