Engine → Scripting → null_script_host.h
null_host_recorder
| Type | Class |
| Namespace | conjure::scripting |
| Include File Path | engine/include/conjure/scripting/null_script_host.h |
| Source File Path | engine/src/scripting/null_script_host.cpp |
| API ↗ | Hosting, the native API and hot reload, Scripting |
Syntax
Constructors
| Access | Signature | Description |
|---|---|---|
| public | null_host_recorder(); | |
| public | null_host_recorder(
const null_host_recorder &) = default; |
Destructors
| Access | Signature | Description |
|---|---|---|
| public | ~null_host_recorder(); |
Variables
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| private | mActivities | std:: | {} | |
| private | mApplies | std:: | {} | |
| public | MAX_RECORDS | static constexpr usize | 65536 | Entries each list keeps; later records are dropped and counted. |
| private | mCalls | std::vector<std::string> | {} | |
| private | m | u32 | 0 | |
| private | m | u32 | 0 | |
| private | mCollisions | std:: | {} | |
| private | mCreates | std:: | {} | |
| private | mDestroys | std:: | {} | |
| private | m | u64 | 0 | |
| private | mEnabled | bool | true | |
| private | m | std::vector<std::string> | {} | |
| private | mPhases | std:: | {} | |
| private | m | u64 | 0 | |
| private | m | u32 | 0 | |
| private | mUnloadCount | u32 | 0 |
Functions
Public
activities
activities[[nodiscard]] const std::vector<activity_record> &activities() const noexcept;Every slot of every set_active call, in call order.
applies
applies[[nodiscard]] const std::vector<apply_record> &applies() const noexcept;calls
calls[[nodiscard]] const std::vector<std::string> &calls() const noexcept;Every managed_api function called, in order, by name ("run_phase", "create_instances", ...).
clear
clearvoid clear();Forgets everything recorded; whether recording is enabled is kept.
collect_fields_count
collect_fields_count[[nodiscard]] u32 collect_fields_count() const noexcept;collect_garbage_count
collect_garbage_count[[nodiscard]] u32 collect_garbage_count() const noexcept;collisions
collisions[[nodiscard]] const std::vector<collision_record> &collisions() const noexcept;count
count[[nodiscard]] u32 count(
std::string_view call) const noexcept;Number of recorded calls with this name (a scan of calls(): at most MAX_RECORDS are kept, and none while recording is disabled).
creates
creates[[nodiscard]] const std::vector<create_record> &creates() const noexcept;destroys
destroys[[nodiscard]] const std::vector<destroy_record> &destroys() const noexcept;dropped_count
dropped_count[[nodiscard]] u64 dropped_count() const noexcept;Records a full list turned away since the last clear().
is_enabled
is_enabled[[nodiscard]] bool is_enabled() const noexcept;False after set_enabled(false): the lists stay as they are.
loaded_assemblies
loaded_assemblies[[nodiscard]] const std::vector<std::string> &loaded_assemblies() const noexcept;Paths handed to load_game_assembly, in order.
phases
phases[[nodiscard]] const std::vector<phase_record> &phases() const noexcept;record_activity
record_activityvoid record_activity(
const activity_record &record);record_apply
record_applyvoid record_apply(
const apply_record &record);record_call
record_callvoid record_call(
std::string_view call);record_collect_fields
record_collect_fieldsvoid record_collect_fields();record_collect_garbage
record_collect_garbagevoid record_collect_garbage();record_collision
record_collisionvoid record_collision(
const collision_record &record);record_create
record_createvoid record_create(
const create_record &record);record_destroy
record_destroyvoid record_destroy(
const destroy_record &record);record_load
record_loadvoid record_load(
std::string path);record_phase
record_phasevoid record_phase(
const phase_record &record);record_sample_memory
record_sample_memoryvoid record_sample_memory();record_shutdown
record_shutdownvoid record_shutdown();record_unload
record_unloadvoid record_unload();sample_memory_count
sample_memory_count[[nodiscard]] u64 sample_memory_count() const noexcept;sample_memory calls. The engine samples once per frame, so these calls are counted here only and never appear in calls().
set_enabled
set_enabledvoid set_enabled(
bool enabled) noexcept;False stops filling the lists, so recording allocates nothing (the null host then builds no record either); the counters keep counting.
shutdown_count
shutdown_count[[nodiscard]] u32 shutdown_count() const noexcept;unload_count
unload_count[[nodiscard]] u32 unload_count() const noexcept;Private
admits
admits[[nodiscard]] bool admits(
usize listSize) noexcept;True when a list of this size may take one more record; counts a drop when it is full.
Operator Overloads
Public
operator=
operator=null_host_recorder &operator=(
const null_host_recorder &) = default;