Fps.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef Fps_H
  2. #define Fps_H
  3. #include <Zeichnung.h>
  4. namespace Framework
  5. {
  6. class Prozess; // Prozess.h
  7. class Bild; // Bild.h
  8. class Schrift; // Schrift.h
  9. class Fps; // aus dieser Datei
  10. class Fps : public Zeichnung
  11. {
  12. private:
  13. Prozess *pr;
  14. double i;
  15. int fpsCount;
  16. int nowFps;
  17. int nowCpu;
  18. int nowMem;
  19. Schrift *schrift;
  20. int sFarbe;
  21. int ref;
  22. public:
  23. // Konstruktor
  24. Fps();
  25. // Destruktor
  26. ~Fps();
  27. // nicht constant
  28. void setSchriftZ( Schrift *schrift ); // setzt die Schrift
  29. void setSFarbe( int f ); // setzt die Schrift Farbe
  30. bool tick( double tickval ) override; // tick
  31. void render( Bild &zRObj ) override; // zeichnet nach zrObj
  32. // constant
  33. Schrift *getSchrift() const; // gibt die Schrift zurück
  34. Schrift *zSchrift() const;
  35. int getFarbe() const; // gibt die Farbe zurück
  36. int getFps() const; // gibt fps zurück
  37. int getCpu() const; // gibt die Cpu zurück
  38. int getMem() const; // gibt den Arbeitsspeicher zurück
  39. // Reference Counting
  40. Fps *getThis();
  41. Fps *release();
  42. };
  43. }
  44. #endif