Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches

RAII scope zone that delegates to the active profiling backends. More...

#include <zone.hpp>

Public Member Functions

 ScopedZone (const ZoneSpec &spec) noexcept
 Creates a new profiling zone with the given specification.
 ScopedZone (const ZoneSpec &spec, bool active) noexcept
 Creates a profiling zone with a runtime activation flag.
 ScopedZone (const ScopedZone &)=delete
 ScopedZone (ScopedZone &&)=delete
 ~ScopedZone () noexcept
ScopedZoneoperator= (const ScopedZone &)=delete
ScopedZoneoperator= (ScopedZone &&)=delete
void SetText (std::string_view text) noexcept
 Updates the zone's text.
void SetValue (uint64_t value) noexcept
 Updates the zone's value.
void SetName (std::string_view name) noexcept
 Updates the zone's name.

Static Public Member Functions

static auto CurrentZoneStorage () noexcept -> std::span< std::byte >
 Retrieves the current zone storage span.

Static Public Attributes

static constexpr size_t kStorage = kZoneStorageBytes

Detailed Description

RAII scope zone that delegates to the active profiling backends.

Definition at line 15 of file zone.hpp.

Constructor & Destructor Documentation

◆ ScopedZone() [1/4]

helios::profile::ScopedZone::ScopedZone ( const ZoneSpec & spec)
explicitnoexcept

Creates a new profiling zone with the given specification.

Parameters
specZone specification

Definition at line 21 of file zone.cpp.

◆ ScopedZone() [2/4]

helios::profile::ScopedZone::ScopedZone ( const ZoneSpec & spec,
bool active )
noexcept

Creates a profiling zone with a runtime activation flag.

Parameters
specZone specification
activeWhether the zone is active

Definition at line 24 of file zone.cpp.

◆ ScopedZone() [3/4]

helios::profile::ScopedZone::ScopedZone ( const ScopedZone & )
delete

◆ ScopedZone() [4/4]

helios::profile::ScopedZone::ScopedZone ( ScopedZone && )
delete

◆ ~ScopedZone()

helios::profile::ScopedZone::~ScopedZone ( )
noexcept

Definition at line 39 of file zone.cpp.

Member Function Documentation

◆ CurrentZoneStorage()

auto helios::profile::ScopedZone::CurrentZoneStorage ( ) -> std::span< std::byte >
staticnodiscardnoexcept

Retrieves the current zone storage span.

Returns
Storage span for the active zone, or empty if none

Definition at line 73 of file zone.cpp.

◆ operator=() [1/2]

ScopedZone & helios::profile::ScopedZone::operator= ( const ScopedZone & )
delete

◆ operator=() [2/2]

ScopedZone & helios::profile::ScopedZone::operator= ( ScopedZone && )
delete

◆ SetName()

void helios::profile::ScopedZone::SetName ( std::string_view name)
noexcept

Updates the zone's name.

Parameters
nameThe new name to associate with the zone

Definition at line 66 of file zone.cpp.

◆ SetText()

void helios::profile::ScopedZone::SetText ( std::string_view text)
noexcept

Updates the zone's text.

Parameters
textThe new text to associate with the zone

Definition at line 52 of file zone.cpp.

◆ SetValue()

void helios::profile::ScopedZone::SetValue ( uint64_t value)
noexcept

Updates the zone's value.

Parameters
valueThe new value to associate with the zone

Definition at line 59 of file zone.cpp.

Member Data Documentation

◆ kStorage

size_t helios::profile::ScopedZone::kStorage = kZoneStorageBytes
staticconstexpr

Definition at line 17 of file zone.hpp.