Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
ProfileHighLevel::Id Class Reference

A high level profile ID. More...

#include <profile_highlevel.h>

Public Member Functions

 Id (void)
 
void Increment (double add=1.0)
 Increment the internal profile value.
 
void SetMax (double max)
 Set a new maximum value.
 
const char * GetName (void) const
 Returns the internal Id name.
 
const char * GetDescr (void) const
 Returns the descriptive name.
 
const char * GetUnit (void) const
 Returns the value's unit text.
 
const char * GetCurrentValue (void) const
 Returns the current value.
 
const char * GetValue (unsigned frame) const
 Returns the value for the given recorded frame/range.
 
const char * GetTotalValue (void) const
 Returns the total value for all frames.
 

Detailed Description

A high level profile ID.

Definition at line 52 of file profile_highlevel.h.

Constructor & Destructor Documentation

◆ Id()

ProfileHighLevel::Id::Id ( void )
inline

Definition at line 57 of file profile_highlevel.h.

Member Function Documentation

◆ GetCurrentValue()

const char * ProfileHighLevel::Id::GetCurrentValue ( void ) const

Returns the current value.

'Current' means the value since the last call to this function for the same Id.

This function is intended for displaying profile data while the application is running.

Note
The contents of the buffer returned may be overwritten by any consecutive call to any profile module function.
Returns
current value

Definition at line 66 of file profile_highlevel.cpp.

◆ GetDescr()

const char * ProfileHighLevel::Id::GetDescr ( void ) const

Returns the descriptive name.

Returns
descriptive name, e.g. '# of 512x512 textures'

Definition at line 56 of file profile_highlevel.cpp.

◆ GetName()

const char * ProfileHighLevel::Id::GetName ( void ) const

Returns the internal Id name.

Returns
internal Id name, e.g. 'render.texture.count.512x512'

Definition at line 51 of file profile_highlevel.cpp.

◆ GetTotalValue()

const char * ProfileHighLevel::Id::GetTotalValue ( void ) const

Returns the total value for all frames.

This even includes data collected while no frames have been recorded.

Note
A call to ProfileHighLevel::ClearTotals() resets this value.
Returns
total value

Definition at line 79 of file profile_highlevel.cpp.

◆ GetUnit()

const char * ProfileHighLevel::Id::GetUnit ( void ) const

Returns the value's unit text.

Returns
unit text, e.g. 'bytes'

Definition at line 61 of file profile_highlevel.cpp.

◆ GetValue()

const char * ProfileHighLevel::Id::GetValue ( unsigned frame) const

Returns the value for the given recorded frame/range.

Note
The contents of the buffer returned may be overwritten by any consecutive call to any profile module function.
Parameters
framenumber of recorded frame/range
Returns
value at given frame, NULL if frame not found

Definition at line 71 of file profile_highlevel.cpp.

◆ Increment()

void ProfileHighLevel::Id::Increment ( double add = 1.0)

Increment the internal profile value.

Note
Do not mix with SetMax.
Parameters
addamount to add to internal profile value

Definition at line 39 of file profile_highlevel.cpp.

◆ SetMax()

void ProfileHighLevel::Id::SetMax ( double max)

Set a new maximum value.

Note
Do not mix with Increment.

This function sets a new maximum value (if the value passed in is actually larger than the current max value).

Parameters
maxnew maximum value (if larger than current max value, otherwise current max value is left unchanged)

Definition at line 45 of file profile_highlevel.cpp.


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