Ocean
Ocean::System::Performance Class Reference

This class implements functionalities concerning the underlying system performance. More...

Inheritance diagram for Ocean::System::Performance:

Public Types

enum  PerformanceLevel : uint32_t {
  LEVEL_LOW , LEVEL_MEDIUM , LEVEL_HIGH , LEVEL_VERY_HIGH ,
  LEVEL_ULTRA
}
 Definition of different system performance levels. More...
 

Public Member Functions

PerformanceLevel performanceLevel ()
 Returns the current performance level. More...
 
void setPerformanceLevel (const PerformanceLevel level)
 Sets the current performance level. More...
 

Protected Member Functions

 Performance ()
 Creates a new Performance object. More...
 
- Protected Member Functions inherited from Ocean::Singleton< Performance >
 Singleton ()=default
 Default constructor. More...
 

Protected Attributes

PerformanceLevel performanceLevel_ = LEVEL_MEDIUM
 Current performance level. More...
 

Friends

class Singleton< Performance >
 

Additional Inherited Members

- Static Public Member Functions inherited from Ocean::Singleton< Performance >
static Performance & get ()
 Returns a reference to the unique object. More...
 

Detailed Description

This class implements functionalities concerning the underlying system performance.

Member Enumeration Documentation

◆ PerformanceLevel

Definition of different system performance levels.

Enumerator
LEVEL_LOW 

Performance level for e.g. mobile phones.

LEVEL_MEDIUM 

Performance level for e.g. mobile computers.

LEVEL_HIGH 

Performance level for e.g. desktop computers.

LEVEL_VERY_HIGH 

Performance level for e.g. workstations.

LEVEL_ULTRA 

Performance level for e.g. high performance workstations.

Constructor & Destructor Documentation

◆ Performance()

Ocean::System::Performance::Performance ( )
protected

Creates a new Performance object.


The default medium performance depends on the number of available processor cores.
A system with one processor core has performance value 'medium' as default.
Systems with two processor cores have performance value 'high' as default.
And systems with four or more processor cores have performance value 'ultra' as default.
However the performance value can be changed at any time.

Member Function Documentation

◆ performanceLevel()

PerformanceLevel Ocean::System::Performance::performanceLevel ( )

Returns the current performance level.

Returns
Current selected performance level

◆ setPerformanceLevel()

void Ocean::System::Performance::setPerformanceLevel ( const PerformanceLevel  level)

Sets the current performance level.

Parameters
levelNew performance level

Friends And Related Function Documentation

◆ Singleton< Performance >

friend class Singleton< Performance >
friend

Field Documentation

◆ performanceLevel_

PerformanceLevel Ocean::System::Performance::performanceLevel_ = LEVEL_MEDIUM
protected

Current performance level.


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