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

an internal high level profile ID More...

#include <internal_highlevel.h>

Public Member Functions

 ProfileId (const char *name, const char *descr, const char *unit, int precision, int exp10)
 
ProfileIdGetNext (void) const
 
const char * GetName (void) const
 
const char * GetUnit (void) const
 
const char * GetDescr (void) const
 
void Increment (double add)
 
void Maximum (double max)
 
double GetCurrentValue (void)
 
double GetTotalValue (void) const
 
bool GetFrameValue (unsigned frame, double &value) const
 
const char * AsString (double v) const
 

Static Public Member Functions

static ProfileIdGetFirst (void)
 
static void Shutdown (void)
 
static int FrameStart (void)
 
static void FrameEnd (int which, int mixIndex)
 
static void ClearTotals (void)
 

Detailed Description

an internal high level profile ID

Definition at line 36 of file internal_highlevel.h.

Constructor & Destructor Documentation

◆ ProfileId()

ProfileId::ProfileId ( const char * name,
const char * descr,
const char * unit,
int precision,
int exp10 )

Creates a new high level profile ID.

Parameters
nameprofile name
descrdescriptive name
unitunit name
precisionnumber of decimal places to show
exp1010 base exponent (used for scaleing)

Definition at line 121 of file profile_highlevel.cpp.

Member Function Documentation

◆ AsString()

const char * ProfileId::AsString ( double v) const

Translate given numeric value into a string, using an internal temp buffer.

Parameters
vvalue
Returns
given numeric value as string

Definition at line 195 of file profile_highlevel.cpp.

◆ ClearTotals()

static void ProfileId::ClearTotals ( void )
inlinestatic

Clears all total values.

Definition at line 166 of file internal_highlevel.h.

◆ FrameEnd()

void ProfileId::FrameEnd ( int which,
int mixIndex )
static

Ends frame based profiling.

Definition at line 233 of file profile_highlevel.cpp.

◆ FrameStart()

int ProfileId::FrameStart ( void )
static

Starts frame based profiling, starts a new frame.

Definition at line 216 of file profile_highlevel.cpp.

◆ GetCurrentValue()

double ProfileId::GetCurrentValue ( void )
inline

Returns current value, internally resetting it.

Returns
current value

Definition at line 107 of file internal_highlevel.h.

◆ GetDescr()

const char * ProfileId::GetDescr ( void ) const
inline

Retrieves description of the profile ID.

Returns
profile description

Definition at line 86 of file internal_highlevel.h.

◆ GetFirst()

static ProfileId * ProfileId::GetFirst ( void )
inlinestatic

Retrieves the first profile ID.

Returns
first profile ID

Definition at line 58 of file internal_highlevel.h.

◆ GetFrameValue()

bool ProfileId::GetFrameValue ( unsigned frame,
double & value ) const
inline

Returns value at the given frame.

Parameters
frameframe number
valuevalue at frame
Returns
true if frame found, false if not

Definition at line 131 of file internal_highlevel.h.

◆ GetName()

const char * ProfileId::GetName ( void ) const
inline

Retrieves name of the profile ID.

Returns
profile ID name

Definition at line 72 of file internal_highlevel.h.

◆ GetNext()

ProfileId * ProfileId::GetNext ( void ) const
inline

Retrieves next profile ID.

Returns
next profile ID, NULL if none

Definition at line 65 of file internal_highlevel.h.

◆ GetTotalValue()

double ProfileId::GetTotalValue ( void ) const
inline

Returns total value

Returns
total value

Definition at line 119 of file internal_highlevel.h.

◆ GetUnit()

const char * ProfileId::GetUnit ( void ) const
inline

Retrieves unit name of the profile ID.

Returns
profile ID unit name

Definition at line 79 of file internal_highlevel.h.

◆ Increment()

void ProfileId::Increment ( double add)

Increments the profile value.

Parameters
addadd value

Definition at line 148 of file profile_highlevel.cpp.

◆ Maximum()

void ProfileId::Maximum ( double max)

Sets a new maximum value.

Parameters
maxnew maximum value

Definition at line 169 of file profile_highlevel.cpp.

◆ Shutdown()

void ProfileId::Shutdown ( void )
static

Shutdown function.

Definition at line 282 of file profile_highlevel.cpp.


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