F.E.I.S/Note.h

48 lines
1001 B
C
Raw Normal View History

2017-08-17 23:41:11 +02:00
//
// Created by Syméon on 17/08/2017.
//
2017-08-18 17:42:56 +02:00
//
// Les notes ne contiennent pas en elles mêmes d'information sur leur timing, c'est la structure Fumen qui
// les contient qui s'en occupe
//
// Pour l'instant je vois pas trop la necessité de changer la position par contre la longeur et la position
// de la queue je pense que ça peut être utile
//
2017-08-17 23:41:11 +02:00
#ifndef FEIS_NOTE_H
#define FEIS_NOTE_H
class Note {
2017-08-18 17:42:56 +02:00
2017-08-17 23:41:11 +02:00
public:
2017-08-18 17:42:56 +02:00
Note(int pos, int timing, int length = 0, int tail_pos = 0);
static bool tail_pos_correct(int pos, int tail_pos);
2017-08-18 17:42:56 +02:00
bool operator==(const Note &rhs) const;
bool operator!=(const Note &rhs) const;
bool operator<(const Note &rhs) const;
bool operator>(const Note &rhs) const;
bool operator<=(const Note &rhs) const;
bool operator>=(const Note &rhs) const;
int getTiming() const;
2017-08-18 17:42:56 +02:00
int getPos() const;
int getLength() const;
int getTail_pos() const;
2019-02-09 16:05:46 +01:00
int getTail_pos_as_note_pos() const;
2017-08-18 17:42:56 +02:00
2017-08-17 23:41:11 +02:00
private:
2017-08-18 17:42:56 +02:00
int timing;
2017-08-17 23:41:11 +02:00
int pos;
2017-08-18 17:42:56 +02:00
int length;
int tail_pos;
2017-08-18 17:42:56 +02:00
2017-08-17 23:41:11 +02:00
};
#endif //FEIS_NOTE_H