StormByte 2.0.0
C++26 foundation of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::Telemetry Class Referenceabstract

Abstract session telemetry base with a protected clock drawer. More...

#include <StormByte/telemetry.hxx>

Public Member Functions

virtual ~Telemetry () noexcept
 Virtual destructor.
 
virtual operator CString () const =0
 Flatten counters into an owned StormByte CString.
 
STORMBYTE_FORCE_INLINE operator std::string () const
 Flatten counters into a caller-owned standard string.
 

Protected Member Functions

 Telemetry () noexcept
 Construct an empty telemetry drawer.
 
 Telemetry (const Telemetry &)=delete
 Copy constructor is deleted.
 
 Telemetry (Telemetry &&other) noexcept
 Move constructor.
 
Telemetry & operator= (const Telemetry &)=delete
 Copy assignment is deleted.
 
Telemetry & operator= (Telemetry &&other) noexcept
 Move assignment.
 
class Clock & Clock (std::string_view name) noexcept
 Access or create a named clock in the drawer.
 
const class Clock & Clock (std::string_view name) const noexcept
 Read-only access to a named clock in the drawer.
 

Detailed Description

Abstract session telemetry base with a protected clock drawer.

Modules derive and extend this class by adding their own domain counters or metrics. Time series and stopwatches are managed in a protected, named clock drawer.

Constructor & Destructor Documentation

◆ ~Telemetry()

virtual StormByte::Telemetry::~Telemetry ( )
virtualnoexcept

Virtual destructor.

Defined out-of-line for DLL boundaries.

◆ Telemetry() [1/3]

StormByte::Telemetry::Telemetry ( )
protectednoexcept

Construct an empty telemetry drawer.

◆ Telemetry() [2/3]

StormByte::Telemetry::Telemetry ( const Telemetry &  )
protecteddelete

Copy constructor is deleted.

◆ Telemetry() [3/3]

StormByte::Telemetry::Telemetry ( Telemetry &&  other)
protectednoexcept

Move constructor.

Parameters
otherObject to move from.

Member Function Documentation

◆ Clock() [1/2]

const class Clock & StormByte::Telemetry::Clock ( std::string_view  name) const
protectednoexcept

Read-only access to a named clock in the drawer.

Parameters
nameClock name.
Returns
Reference to the clock if found, or a static empty clock if missing.

◆ Clock() [2/2]

class Clock & StormByte::Telemetry::Clock ( std::string_view  name)
protectednoexcept

Access or create a named clock in the drawer.

Parameters
nameUnique clock name.
Returns
Reference to the requested clock.

◆ operator CString()

virtual StormByte::Telemetry::operator CString ( ) const
pure virtual

Flatten counters into an owned StormByte CString.

Returns
Formatted telemetry string.

◆ operator std::string()

STORMBYTE_FORCE_INLINE StormByte::Telemetry::operator std::string ( ) const
inline

Flatten counters into a caller-owned standard string.

Returns
Formatted standard string allocated on caller heap.

◆ operator=() [1/2]

Telemetry & StormByte::Telemetry::operator= ( const Telemetry &  )
protecteddelete

Copy assignment is deleted.

Returns
Reference to this telemetry object.

◆ operator=() [2/2]

Telemetry & StormByte::Telemetry::operator= ( Telemetry &&  other)
protectednoexcept

Move assignment.

Parameters
otherObject to move from.
Returns
Reference to this telemetry object.

The documentation for this class was generated from the following file: