LCOV - code coverage report
Current view: top level - src/importexport/guitarpro/internal/gtp - gprhythm.h Coverage Total Hit
Test: filtered_coverage.info Lines: 100.0 % 5 5
Test Date: 2026-11-05 04:07:02

            Line data    Source code
       1              : #ifndef MU_IMPORTEXPORT_GPRHYTHM_H
       2              : #define MU_IMPORTEXPORT_GPRHYTHM_H
       3              : 
       4              : #include <utility>
       5              : 
       6              : namespace mu::iex::guitarpro {
       7              : class GPRhythm
       8              : {
       9              : public:
      10              :     enum class RhytmType {
      11              :         SixtyFourth, ThirtySecond, Sixteenth, Eighth, Quarter, Half, Whole
      12              :     };
      13              :     struct Tuplet {
      14              :         int num{ -1 };
      15              :         int denom{ -1 };
      16              :     };
      17              : 
      18          347 :     void setRhytm(RhytmType t) { _rhythm = t; }
      19              : 
      20         4296 :     std::pair<int, RhytmType> length() const { return { _dotCount, _rhythm }; }
      21              : 
      22              :     RhytmType type() const { return _rhythm; }
      23              : 
      24           14 :     void setTuplet(Tuplet t) { _tuplet = t; }
      25         6414 :     Tuplet tuplet() const { return _tuplet; }
      26              : 
      27           11 :     void setDotCount(int c) { _dotCount = c; }
      28              :     int dotCount() const { return _dotCount; }
      29              : 
      30              : private:
      31              :     RhytmType _rhythm{ RhytmType::Whole };
      32              :     Tuplet _tuplet;
      33              :     int _dotCount{ 0 };
      34              : };
      35              : } // namespace mu::iex::guitarpro
      36              : #endif // MU_IMPORTEXPORT_GPRHYTHM_H
        

Generated by: LCOV version 2.0-1