Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoPerfStateCounter Class Reference

Performance State Counter. More...

#include <Inventor/stats/SoPerfStateCounter.h>

+ Inheritance diagram for SoPerfStateCounter:

Public Member Functions

 SoPerfStateCounter (const SbString &name, const SbString &description, const SbString &module="no module", const LevelEnum level=MEDIUM, bool custom=false)
 Constructor with SbString.
 
SoNONUNICODE SoPerfStateCounter (const char *name, const char *description)
 Constructor with char*.
 
virtual ~SoPerfStateCounter ()
 Destructor.
 
virtual void reset ()
 Resets the counter.
 
- Public Member Functions inherited from SoPerfCounter
virtual SoType getTypeId () const
 Returns the type of current instance.
 
const char * getName ()
 Returns the name of current counter;.
 
SoNONUNICODE const char * getDescription ()
 Returns the description of current counter;.
 
SbString getStringDescription ()
 Returns the description of current counter;.
 
SoPerfCounterValue getValue ()
 Returns the value of the counter.
 
virtual void setValue (SoPerfCounterValue value)
 Set the counter value.
 
void setScale (SoPerfCounterValue scale)
 Sets the scale factor.
 
SoPerfCounterValue getScale () const
 Returns the scale factor.
 
SbString getType () const
 Returns the type of the counter.
 
SbString getModule () const
 Returns the module of the counter.
 
SbString getStringLevel () const
 Returns the level of the counter.
 
int getLevel () const
 Returns the level of the counter.
 
bool isCustom () const
 Returns TRUE if the counter results of an operation between other counters.
 
SbName getFirstParent () const
 Returns the name of the first parent.
 
SbName getSecondParent () const
 Returns the name of the second parent.
 
void setFirstParent (SbName firstParent)
 Sets the name of the first parent.
 
void setSecondParent (SbName secondParent)
 Sets the name of the second parent.
 
SbString getOperation () const
 Returns the operation made between the two parents.
 
void setOperation (SbString operation)
 Sets the operation made between the two parents.
 
virtual void increment (SoPerfCounterValue value)
 Increments/Decrements counter value by 'value'.
 
virtual void decrement (SoPerfCounterValue value)
 
void setID (int id)
 Sets/Gets counter id.
 
int getID ()
 
void setEnable (bool e)
 Sets/Gets the use state.
 
bool isEnabled ()
 

Additional Inherited Members

- Public Types inherited from SoPerfCounter
enum  LevelEnum {
  LOW = 0 ,
  MEDIUM = 1 ,
  HIGH = 2
}
 Various levels for a counter. More...
 
typedef double SoPerfCounterValue
 
- Static Public Member Functions inherited from SoPerfCounter
static SoType getClassTypeId ()
 Returns the Type of current class.
 

Detailed Description

Performance State Counter.

Defines a performance counter of type state. A counter is "custom" when its values are the result of an operation between the values of other counters. Resetting this counter has no effect.

SEE ALSO

SoPerfCounter, SoPerfAccumCounter, SoPerfCounterManager

Definition at line 47 of file SoPerfStateCounter.h.

Constructor & Destructor Documentation

◆ SoPerfStateCounter() [1/2]

SoPerfStateCounter::SoPerfStateCounter ( const SbString name,
const SbString description,
const SbString module = "no module",
const LevelEnum  level = MEDIUM,
bool  custom = false 
)

Constructor with SbString.

Creates a counter of type "state".

Parameters
nameName of the counter.
descriptionWhat the counter does.
moduleThe module in which it is relevant to use this counter.
levelThe qualification level required to use this counter.
customTRUE if the counter results of an operation between other counters. If it is the case, you will have to set the names of the two parents and the operation with the appropriate methods.

◆ SoPerfStateCounter() [2/2]

SoNONUNICODE SoPerfStateCounter::SoPerfStateCounter ( const char *  name,
const char *  description 
)

Constructor with char*.

Creates a counter of type "state".

Parameters
nameName of the counter.
descriptionWhat the counter does.

Non Unicode: This function should not be used in a Unicode application.

◆ ~SoPerfStateCounter()

virtual SoPerfStateCounter::~SoPerfStateCounter ( )
virtual

Destructor.

Member Function Documentation

◆ reset()

virtual void SoPerfStateCounter::reset ( )
virtual

Resets the counter.

Currently this method does not do anything.

Implements SoPerfCounter.


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